When using keys as owned strings instead of &'static str:
slog = { version = "2.5.1", features = ["dynamic-keys"] }
this crate is not compiled:
Checking slog-kvfilter v0.7.0
error[E0277]: the trait bound `&str: std::borrow::Borrow<slog::Key>` is not satisfied
--> /home/xx/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-kvfilter-0.7.0/src/lib.rs:38:69
|
38 | let matched = if let Some(keyvalues) = self.pending_matches.get(&key) {
| ^^^ the trait `std::borrow::Borrow<slog::Key>` is not implemented for `&str`
error[E0277]: the trait bound `slog::Key: std::cmp::Eq` is not satisfied
--> /home/xx/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-kvfilter-0.7.0/src/lib.rs:38:69
|
38 | let matched = if let Some(keyvalues) = self.pending_matches.get(&key) {
| ^^^ the trait `std::cmp::Eq` is not implemented for `slog::Key`
error[E0277]: the trait bound `&'a str: std::borrow::Borrow<slog::Key>` is not satisfied
--> /home/xx/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-kvfilter-0.7.0/src/lib.rs:48:34
|
48 | self.pending_matches.remove(&key);
| ^^^^^^ the trait `std::borrow::Borrow<slog::Key>` is not implemented for `&'a str`
error[E0277]: the trait bound `slog::Key: std::cmp::Eq` is not satisfied
--> /home/xx/.cargo/registry/src/github.com-1ecc6299db9ec823/slog-kvfilter-0.7.0/src/lib.rs:48:34
|
48 | self.pending_matches.remove(&key);
| ^^^^^^ the trait `std::cmp::Eq` is not implemented for `slog::Key`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `slog-kvfilter`.
When using keys as owned strings instead of
&'static str:this crate is not compiled: