Debian Codegraph @

tests/borrowed_str.rs

raw symbols SCIP
1 use serderust-analyzer cargo serde 1.0.228 crate/::{Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#, Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#};
2
3 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Serializerust-analyzer cargo serde_derive 1.0.228 Serialize:, Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)]
4 struct Borrowedrust-analyzer cargo ron 0.12.0 Borrowed#<'a> {
5 valuerust-analyzer cargo ron 0.12.0 Borrowed#value.: &'a str,
6 }
7
8 const BORROWEDrust-analyzer cargo ron 0.12.0 BORROWED.: &str = "Borrowed(value: \"test\")";
9
10 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
11 fn borrowed_strrust-analyzer cargo ron 0.12.0 borrowed_str().() {
12 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
13 ronrust-analyzer cargo ron 0.12.0 crate/::derust-analyzer cargo ron 0.12.0 de/::from_strrust-analyzer cargo ron 0.12.0 de/from_str().(BORROWEDrust-analyzer cargo ron 0.12.0 BORROWED.).okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]ok().(),
14 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Borrowedrust-analyzer cargo ron 0.12.0 Borrowed# { valuerust-analyzer cargo ron 0.12.0 Borrowed#value.: "test" })
15 );
16 }