Skip to content

Commit

Permalink
Merge pull request #2 from extism/extism-env-namespace
Browse files Browse the repository at this point in the history
chore: update to use new extism namespace
  • Loading branch information
zshipko authored Oct 30, 2023
2 parents 01ffc7f + d86fcd7 commit de42aa1
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 24 deletions.
94 changes: 75 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [
resolver = "2"

[workspace.dependencies]
extism-pdk = "0.3.4"
extism-pdk = {git = "https://github.com/extism/rust-pdk"}
anyhow = "1.0.75"
serde = "1.0.188"

4 changes: 2 additions & 2 deletions count_vowels/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ fn store_total(total: u32) {

fn get_vowels() -> String {
match config::get("vowels") {
Some(v) => v,
None => VOWELS.to_string(),
Ok(Some(v)) => v,
_ => VOWELS.to_string(),
}
}

Expand Down
4 changes: 2 additions & 2 deletions count_vowels_kvstore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn store_total(total: u32) -> Result<()> {

fn get_vowels() -> String {
match config::get("vowels") {
Some(v) => v,
None => VOWELS.to_string(),
Ok(Some(v)) => v,
_ => VOWELS.to_string(),
}
}

Expand Down
2 changes: 2 additions & 0 deletions loop_forever/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ use extism_pdk::*;
#[plugin_fn]
pub fn loop_forever(_: ()) -> FnResult<()> {
loop {}

#[allow(unreachable_code)]
Ok(())
}
1 change: 1 addition & 0 deletions store_credit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct Customer {

#[derive(Deserialize)]
struct ChargeSuceededEvent {
#[allow(unused)]
pub event_type: String,
pub customer: Customer,
}
Expand Down

0 comments on commit de42aa1

Please sign in to comment.