Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0277]: the trait bound `for<'de> &tests::DemoStruct: _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not satisfied
- --> src/lib.rs:304:24
- |
- 304 | my_db.add_item(&testing_struct)?;
- | -^^^^^^^^^^^^^^
- | |
- | the trait `for<'de> _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not implemented for `&tests::DemoStruct`
- | help: consider removing 1 leading `&`-references
- |
- = help: the following implementations were found:
- <tests::DemoStruct as _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>>
- = note: required because of the requirements on the impl of `_IMPL_DESERIALIZE_FOR_Database::_serde::de::DeserializeOwned` for `&tests::DemoStruct`
- error[E0277]: the trait bound `for<'de> &tests::DemoStruct: _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not satisfied
- --> src/lib.rs:297:25
- |
- 105 | pub fn new(label: String, save_path: Option<PathBuf>, strict_dupes: bool) -> Self {
- | --------------------------------------------------------------------------------- required by `Database::<T>::new`
- ...
- 297 | let mut my_db = Database::new(String::from("Removal test"), None, true);
- | ^^^^^^^^^^^^^ the trait `for<'de> _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not implemented for `&tests::DemoStruct`
- |
- = help: the following implementations were found:
- <tests::DemoStruct as _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>>
- = note: required because of the requirements on the impl of `_IMPL_DESERIALIZE_FOR_Database::_serde::de::DeserializeOwned` for `&tests::DemoStruct`
- error[E0599]: no method named `remove_item` found for type `Database<&tests::DemoStruct>` in the current scope
- --> src/lib.rs:305:15
- |
- 81 | pub struct Database<T: hash::Hash + Eq> {
- | --------------------------------------- method `remove_item` not found for this
- ...
- 305 | my_db.remove_item(&testing_struct)?;
- | ^^^^^^^^^^^ method not found in `Database<&tests::DemoStruct>`
- |
- = note: the method `remove_item` exists but the following trait bounds were not satisfied:
- `&tests::DemoStruct : _IMPL_DESERIALIZE_FOR_Database::_serde::de::DeserializeOwned`
- error: aborting due to 3 previous errors
- Some errors have detailed explanations: E0277, E0599.
- For more information about an error, try `rustc --explain E0277`.
- error: could not compile `tinydb`.
- warning: build failed, waiting for other jobs to finish...
- error: build failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement