Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. error[E0277]: the trait bound `for<'de> &tests::DemoStruct: _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not satisfied
  2. --> src/lib.rs:304:24
  3. |
  4. 304 | my_db.add_item(&testing_struct)?;
  5. | -^^^^^^^^^^^^^^
  6. | |
  7. | the trait `for<'de> _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not implemented for `&tests::DemoStruct`
  8. | help: consider removing 1 leading `&`-references
  9. |
  10. = help: the following implementations were found:
  11. <tests::DemoStruct as _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>>
  12. = note: required because of the requirements on the impl of `_IMPL_DESERIALIZE_FOR_Database::_serde::de::DeserializeOwned` for `&tests::DemoStruct`
  13.  
  14. error[E0277]: the trait bound `for<'de> &tests::DemoStruct: _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not satisfied
  15. --> src/lib.rs:297:25
  16. |
  17. 105 | pub fn new(label: String, save_path: Option<PathBuf>, strict_dupes: bool) -> Self {
  18. | --------------------------------------------------------------------------------- required by `Database::<T>::new`
  19. ...
  20. 297 | let mut my_db = Database::new(String::from("Removal test"), None, true);
  21. | ^^^^^^^^^^^^^ the trait `for<'de> _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>` is not implemented for `&tests::DemoStruct`
  22. |
  23. = help: the following implementations were found:
  24. <tests::DemoStruct as _IMPL_DESERIALIZE_FOR_Database::_serde::Deserialize<'de>>
  25. = note: required because of the requirements on the impl of `_IMPL_DESERIALIZE_FOR_Database::_serde::de::DeserializeOwned` for `&tests::DemoStruct`
  26.  
  27. error[E0599]: no method named `remove_item` found for type `Database<&tests::DemoStruct>` in the current scope
  28. --> src/lib.rs:305:15
  29. |
  30. 81 | pub struct Database<T: hash::Hash + Eq> {
  31. | --------------------------------------- method `remove_item` not found for this
  32. ...
  33. 305 | my_db.remove_item(&testing_struct)?;
  34. | ^^^^^^^^^^^ method not found in `Database<&tests::DemoStruct>`
  35. |
  36. = note: the method `remove_item` exists but the following trait bounds were not satisfied:
  37. `&tests::DemoStruct : _IMPL_DESERIALIZE_FOR_Database::_serde::de::DeserializeOwned`
  38.  
  39. error: aborting due to 3 previous errors
  40.  
  41. Some errors have detailed explanations: E0277, E0599.
  42. For more information about an error, try `rustc --explain E0277`.
  43. error: could not compile `tinydb`.
  44. warning: build failed, waiting for other jobs to finish...
  45. error: build failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement