diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/example-completion/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/example-completion/src/main.rs | 2 | ||||
| -rw-r--r-- | examples/example-hook/src/main.rs | 2 | ||||
| -rw-r--r-- | examples/example-pathfinder/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/example-unit-test/src/main.rs | 8 |
5 files changed, 10 insertions, 10 deletions
diff --git a/examples/example-completion/Cargo.toml b/examples/example-completion/Cargo.toml index 1c6b327..00c7f8c 100644 --- a/examples/example-completion/Cargo.toml +++ b/examples/example-completion/Cargo.toml @@ -20,8 +20,8 @@ features = [ "comp", # If you want to build completion scripts, - # enable `builds` features - "builds", + # enable `build` features + "build", ] [workspace] diff --git a/examples/example-completion/src/main.rs b/examples/example-completion/src/main.rs index 45cc8ef..d65be49 100644 --- a/examples/example-completion/src/main.rs +++ b/examples/example-completion/src/main.rs @@ -7,7 +7,7 @@ //! To make your completions work, you need to generate a completion script using Mingling's tools //! //! 1. Enable features -//! You need to enable the `builds` and `comp` features for `mingling` in `[build-dependencies]` +//! You need to enable the `build` and `comp` features for `mingling` in `[build-dependencies]` //! //! 2. Write `build.rs` //! Write the following in `build.rs` diff --git a/examples/example-hook/src/main.rs b/examples/example-hook/src/main.rs index 23b87c7..da92045 100644 --- a/examples/example-hook/src/main.rs +++ b/examples/example-hook/src/main.rs @@ -40,7 +40,7 @@ fn main() { .on_pre_chain(|info| { println!("[DEBUG] Pre chain: {}", info.input); }) - .on_post_chain(|info| println!("[DEBUG] Post chain: {}", info.output.member_id)) + .on_post_chain(|info| println!("[DEBUG] Post chain: {}", info.output.member_id())) .on_finish(|_| { println!("[DEBUG] Loop end"); ProgramControlUnit::OverrideExitCode(0) // Override exit code diff --git a/examples/example-pathfinder/Cargo.toml b/examples/example-pathfinder/Cargo.toml index bd362f2..bc41bd2 100644 --- a/examples/example-pathfinder/Cargo.toml +++ b/examples/example-pathfinder/Cargo.toml @@ -18,8 +18,8 @@ features = [ # Enable `pathf` features "pathf", - # Enable the `builds` feature for build-time support - "builds", + # Enable the `build` feature for build-time support + "build", ] [workspace] diff --git a/examples/example-unit-test/src/main.rs b/examples/example-unit-test/src/main.rs index b85ff01..e9169df 100644 --- a/examples/example-unit-test/src/main.rs +++ b/examples/example-unit-test/src/main.rs @@ -42,25 +42,25 @@ mod tests { #[test] fn test_render_result_name() { let r = render_result_name(ResultName::new("Peter".into())); - assert_eq!(r.to_string().as_str(), "Hello, Peter!\n") + assert_eq!(r.to_string().as_str(), "Hello, Peter!") } #[test] fn test_render_error_no_name_provided() { let r = render_error_no_name_provided(ErrorNoNameProvided::default()); - assert_eq!(r.to_string().as_str(), "No name provided\n") + assert_eq!(r.to_string().as_str(), "No name provided") } #[test] fn test_render_error_name_not_available() { let r = render_error_name_not_available(ErrorNameNotAvailable::default()); - assert_eq!(r.to_string().as_str(), "Name not available\n") + assert_eq!(r.to_string().as_str(), "Name not available") } #[test] fn test_render_error_name_too_long() { let r = render_error_name_too_long(ErrorNameTooLong::new(17)); - assert_eq!(r.to_string().as_str(), "Name too long: 17 > 10\n") + assert_eq!(r.to_string().as_str(), "Name too long: 17 > 10") } // --------- IMPORTANT --------- } |
