Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- warning: sodg v0.0.0 (/Users/l3r8y/IdeaProjects/sodg) ignoring invalid dependency `clippy` which is missing a lib target
- Checking memchr v2.5.0
- Checking futures-core v0.3.25
- Checking libc v0.2.137
- Checking futures-sink v0.3.25
- Checking futures-task v0.3.25
- Checking slab v0.4.7
- Checking futures-io v0.3.25
- Checking pin-project-lite v0.2.9
- Checking pin-utils v0.1.0
- Checking peresil v0.3.0
- Checking typed-arena v1.7.0
- Checking futures-channel v0.3.25
- Checking cfg-if v1.0.0
- Checking itoa v1.0.4
- Checking time-core v0.1.0
- Checking lazy_static v1.4.0
- Checking log v0.4.17
- Checking aho-corasick v0.7.19
- Checking sxd-document v0.3.2
- Checking serde v1.0.152
- Checking regex-syntax v0.6.28
- Checking atty v0.2.14
- Checking num_threads v0.1.6
- Checking futures-util v0.3.25
- Checking quick-error v1.2.3
- Checking colored v2.0.0
- Checking time v0.3.17
- Checking either v1.8.0
- Checking futures-timer v3.0.2
- Checking itertools v0.10.5
- Checking anyhow v1.0.69
- Checking hex v0.4.3
- Checking sxd-xpath v0.4.2
- Checking xml-builder v0.5.1
- Checking simple_logger v4.0.0
- Checking regex v1.7.1
- Checking futures-executor v0.3.25
- Checking bincode v1.3.3
- Checking futures v0.3.25
- Checking rstest v0.16.0
- Checking sodg v0.0.0 (/Users/l3r8y/IdeaProjects/sodg)
- error: using `pub use`
- --> src/lib.rs:73:1
- |
- 73 | pub use crate::alerts::Alert;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: move the exported item to a public module instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pub_use
- note: the lint level is defined here
- --> src/lib.rs:40:9
- |
- 40 | #![deny(warnings)]
- | ^^^^^^^^
- = note: `#[deny(clippy::pub_use)]` implied by `#[deny(warnings)]`
- error: using `pub use`
- --> src/lib.rs:75:1
- |
- 75 | pub use crate::hex::Hex;
- | ^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: move the exported item to a public module instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pub_use
- error: using `pub use`
- --> src/lib.rs:76:1
- |
- 76 | pub use crate::script::Script;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: move the exported item to a public module instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pub_use
- error: found empty brackets on struct declaration
- --> src/lib.rs:147:21
- |
- 147 | pub struct DeadRelay {}
- | ^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_structs_with_brackets
- = note: `#[deny(clippy::empty_structs_with_brackets)]` implied by `#[deny(warnings)]`
- = help: remove the brackets
- error: missing documentation for a module
- --> src/lib.rs:49:1
- |
- 49 | mod alerts;
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- = note: `#[deny(clippy::missing_docs_in_private_items)]` implied by `#[deny(warnings)]`
- error: missing `#[inline]` for a method
- --> src/alerts.rs:55:5
- |
- 55 | / pub fn alert_on(&mut self, a: Alert) {
- 56 | | self.alerts.push(a);
- 57 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- = note: `#[deny(clippy::missing_inline_in_public_items)]` implied by `#[deny(warnings)]`
- error: missing `#[inline]` for a method
- --> src/alerts.rs:60:5
- |
- 60 | / pub fn alerts_off(&mut self) {
- 61 | | self.alerts_active = false;
- 62 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: docs for function returning `Result` missing `# Errors` section
- --> src/alerts.rs:69:5
- |
- 69 | pub fn alerts_on(&mut self) -> Result<()> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- = note: `#[deny(clippy::missing_errors_doc)]` implied by `#[deny(warnings)]`
- error: missing `#[inline]` for a method
- --> src/alerts.rs:69:5
- |
- 69 | / pub fn alerts_on(&mut self) -> Result<()> {
- 70 | | self.alerts_active = true;
- 71 | | self.validate(self.vertices.keys().cloned().collect())
- 72 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/alerts.rs:71:9
- |
- 71 | self.validate(self.vertices.keys().cloned().collect())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.validate(self.vertices.keys().cloned().collect())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- = note: `#[deny(clippy::implicit_return)]` implied by `#[deny(warnings)]`
- error: used `cloned` where `copied` could be used instead
- --> src/alerts.rs:71:44
- |
- 71 | self.validate(self.vertices.keys().cloned().collect())
- | ^^^^^^ help: try: `copied`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cloned_instead_of_copied
- = note: `#[deny(clippy::cloned_instead_of_copied)]` implied by `#[deny(warnings)]`
- error: docs for function returning `Result` missing `# Errors` section
- --> src/alerts.rs:77:5
- |
- 77 | pub fn validate(&self, vx: Vec<u32>) -> Result<()> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/alerts.rs:77:5
- |
- 77 | / pub fn validate(&self, vx: Vec<u32>) -> Result<()> {
- 78 | | if self.alerts_active {
- 79 | | for a in self.alerts.iter() {
- 80 | | let msgs = a(self, vx.clone());
- ... |
- 86 | | Ok(())
- 87 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/alerts.rs:86:9
- |
- 86 | Ok(())
- | ^^^^^^ help: add `return` as shown: `return Ok(())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this argument is passed by value, but not consumed in the function body
- --> src/alerts.rs:77:32
- |
- 77 | pub fn validate(&self, vx: Vec<u32>) -> Result<()> {
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
- = note: `#[deny(clippy::needless_pass_by_value)]` implied by `#[deny(warnings)]`
- help: consider changing the type to
- |
- 77 | pub fn validate(&self, vx: &[u32]) -> Result<()> {
- | ~~~~~~
- help: change `vx.clone()` to
- |
- 80 | let msgs = a(self, vx.to_owned());
- | ~~~~~~~~~~~~~
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/alerts.rs:79:22
- |
- 79 | for a in self.alerts.iter() {
- | ^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.alerts`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- = note: `#[deny(clippy::explicit_iter_loop)]` implied by `#[deny(warnings)]`
- error: missing documentation for a module
- --> src/lib.rs:50:1
- |
- 50 | mod clone;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing trait method provided by default: `clone_from`
- --> src/clone.rs:23:1
- |
- 23 | impl Clone for Sodg {
- | ^^^^^^^^^^^^^^^^^^^
- |
- help: implement the method
- --> /Users/l3r8y/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/clone.rs:132:5
- |
- 132 | / fn clone_from(&mut self, source: &Self)
- 133 | | where
- 134 | | Self: ~const Destruct,
- | |______________________________^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_trait_methods
- = note: `#[deny(clippy::missing_trait_methods)]` implied by `#[deny(warnings)]`
- error: missing `#[inline]` for a method
- --> src/clone.rs:25:5
- |
- 25 | / fn clone(&self) -> Self {
- 26 | | Sodg {
- 27 | | vertices: self.vertices.clone(),
- 28 | | next_v: self.next_v,
- ... |
- 33 | | }
- 34 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/clone.rs:26:9
- |
- 26 | / Sodg {
- 27 | | vertices: self.vertices.clone(),
- 28 | | next_v: self.next_v,
- 29 | | alerts: vec![],
- ... |
- 32 | | finds: self.finds.clone(),
- 33 | | }
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 26 ~ return Sodg {
- 27 + vertices: self.vertices.clone(),
- 28 + next_v: self.next_v,
- 29 + alerts: vec![],
- 30 + alerts_active: false,
- 31 + #[cfg(feature = "sober")]
- 32 + finds: self.finds.clone(),
- 33 + }
- |
- error: unnecessary structure name repetition
- --> src/clone.rs:26:9
- |
- 26 | Sodg {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- = note: `#[deny(clippy::use_self)]` implied by `#[deny(warnings)]`
- error: missing documentation for a module
- --> src/lib.rs:51:1
- |
- 51 | mod ctors;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: this method could have a `#[must_use]` attribute
- --> src/ctors.rs:30:5
- |
- 30 | pub fn empty() -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn empty() -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- = note: `#[deny(clippy::must_use_candidate)]` implied by `#[deny(warnings)]`
- error: docs for function which may panic missing `# Panics` section
- --> src/ctors.rs:30:5
- |
- 30 | pub fn empty() -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- note: first possible panic found here
- --> src/ctors.rs:42:26
- |
- 42 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
- = note: `#[deny(clippy::missing_panics_doc)]` implied by `#[deny(warnings)]`
- error: missing `#[inline]` for a method
- --> src/ctors.rs:30:5
- |
- 30 | / pub fn empty() -> Self {
- 31 | | let mut g = Sodg {
- 32 | | vertices: HashMap::new(),
- 33 | | next_v: 0,
- ... |
- 128 | | g
- 129 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ctors.rs:128:9
- |
- 128 | g
- | ^ help: add `return` as shown: `return g`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/ctors.rs:31:21
- |
- 31 | let mut g = Sodg {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing `return` statement
- --> src/ctors.rs:48:13
- |
- 48 | errors
- | ^^^^^^ help: add `return` as shown: `return errors`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `g` shadows a previous, unrelated binding
- --> src/ctors.rs:39:21
- |
- 39 | g.alert_on(|g, vx| {
- | ^
- |
- note: previous binding is here
- --> src/ctors.rs:31:13
- |
- 31 | let mut g = Sodg {
- | ^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
- = note: `#[deny(clippy::shadow_unrelated)]` implied by `#[deny(warnings)]`
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:41:22
- |
- 41 | for v in vx.iter() {
- | ^^^^^^^^^ help: to write this more concisely, try: `&vx`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:42:26
- |
- 42 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&g.vertices.get(v).unwrap().edges`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/ctors.rs:42:26
- |
- 42 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&g.vertices[v]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- = note: `#[deny(clippy::get_unwrap)]` implied by `#[deny(warnings)]`
- error: used `unwrap()` on an `Option` value
- --> src/ctors.rs:42:26
- |
- 42 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- = note: `#[deny(clippy::unwrap_used)]` implied by `#[deny(warnings)]`
- error: literal non-ASCII character detected
- --> src/ctors.rs:44:45
- |
- 44 | errors.push(format!("Edge ν{}.{} arrives to lost ν{}", v, e.a, e.to));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge \u{3bd}{}.{} arrives to lost \u{3bd}{}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- = note: `#[deny(clippy::non_ascii_literal)]` implied by `#[deny(warnings)]`
- error: missing `return` statement
- --> src/ctors.rs:59:13
- |
- 59 | errors
- | ^^^^^^ help: add `return` as shown: `return errors`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `g` shadows a previous, unrelated binding
- --> src/ctors.rs:50:21
- |
- 50 | g.alert_on(|g, vx| {
- | ^
- |
- note: previous binding is here
- --> src/ctors.rs:31:13
- |
- 31 | let mut g = Sodg {
- | ^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:52:22
- |
- 52 | for v in vx.iter() {
- | ^^^^^^^^^ help: to write this more concisely, try: `&vx`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:53:26
- |
- 53 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&g.vertices.get(v).unwrap().edges`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/ctors.rs:53:26
- |
- 53 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&g.vertices[v]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- error: used `unwrap()` on an `Option` value
- --> src/ctors.rs:53:26
- |
- 53 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: literal non-ASCII character detected
- --> src/ctors.rs:55:45
- |
- 55 | errors.push(format!("Edge ν{}.{} arrives to ν{} (loop)", v, e.a, e.to));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge \u{3bd}{}.{} arrives to \u{3bd}{} (loop)"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/ctors.rs:70:13
- |
- 70 | errors
- | ^^^^^^ help: add `return` as shown: `return errors`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `g` shadows a previous, unrelated binding
- --> src/ctors.rs:61:21
- |
- 61 | g.alert_on(|g, vx| {
- | ^
- |
- note: previous binding is here
- --> src/ctors.rs:31:13
- |
- 31 | let mut g = Sodg {
- | ^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:63:22
- |
- 63 | for v in vx.iter() {
- | ^^^^^^^^^ help: to write this more concisely, try: `&vx`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:64:26
- |
- 64 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&g.vertices.get(v).unwrap().edges`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/ctors.rs:64:26
- |
- 64 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&g.vertices[v]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- error: used `unwrap()` on an `Option` value
- --> src/ctors.rs:64:26
- |
- 64 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: literal non-ASCII character detected
- --> src/ctors.rs:66:45
- |
- 66 | errors.push(format!("Edge from ν{} to ν{} has empty label", v, e.to));
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge from \u{3bd}{} to \u{3bd}{} has empty label"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/ctors.rs:84:13
- |
- 84 | errors
- | ^^^^^^ help: add `return` as shown: `return errors`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `g` shadows a previous, unrelated binding
- --> src/ctors.rs:72:21
- |
- 72 | g.alert_on(|g, vx| {
- | ^
- |
- note: previous binding is here
- --> src/ctors.rs:31:13
- |
- 31 | let mut g = Sodg {
- | ^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:74:22
- |
- 74 | for v in vx.iter() {
- | ^^^^^^^^^ help: to write this more concisely, try: `&vx`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:75:26
- |
- 75 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&g.vertices.get(v).unwrap().edges`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/ctors.rs:75:26
- |
- 75 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&g.vertices[v]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- error: used `unwrap()` on an `Option` value
- --> src/ctors.rs:75:26
- |
- 75 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: literal non-ASCII character detected
- --> src/ctors.rs:78:29
- |
- 78 | ... "Edge ν{}.{} points to ν{}, which doesn't exist",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge \u{3bd}{}.{} points to \u{3bd}{}, which doesn't exist"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/ctors.rs:123:13
- |
- 123 | errors
- | ^^^^^^ help: add `return` as shown: `return errors`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `g` shadows a previous, unrelated binding
- --> src/ctors.rs:86:21
- |
- 86 | g.alert_on(|g, vx| {
- | ^
- |
- note: previous binding is here
- --> src/ctors.rs:31:13
- |
- 31 | let mut g = Sodg {
- | ^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:88:22
- |
- 88 | for v in vx.iter() {
- | ^^^^^^^^^ help: to write this more concisely, try: `&vx`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/ctors.rs:89:26
- |
- 89 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&g.vertices.get(v).unwrap().edges`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/ctors.rs:89:26
- |
- 89 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&g.vertices[v]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- error: used `unwrap()` on an `Option` value
- --> src/ctors.rs:89:26
- |
- 89 | for e in g.vertices.get(v).unwrap().edges.iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: literal non-ASCII character detected
- --> src/ctors.rs:92:29
- |
- 92 | ... "Edge label from ν{} to ν{} is an empty string",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge label from \u{3bd}{} to \u{3bd}{} is an empty string"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ctors.rs:98:29
- |
- 98 | ... "Edge label from ν{} to ν{} has prohibited spaces: '{}'",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge label from \u{3bd}{} to \u{3bd}{} has prohibited spaces: '{}'"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ctors.rs:105:29
- |
- 105 | ... "Edge label from ν{} to ν{} has more than one slash: '{}'",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge label from \u{3bd}{} to \u{3bd}{} has more than one slash: '{}'"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: indexing may panic
- --> src/ctors.rs:109:24
- |
- 109 | if parts[0].contains('.') {
- | ^^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- = note: `#[deny(clippy::indexing_slicing)]` implied by `#[deny(warnings)]`
- error: literal non-ASCII character detected
- --> src/ctors.rs:111:29
- |
- 111 | ... "Edge label from ν{} to ν{} has a dot inside the head part: '{}'",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge label from \u{3bd}{} to \u{3bd}{} has a dot inside the head part: '{}'"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: indexing may panic
- --> src/ctors.rs:115:44
- |
- 115 | if parts.len() == 2 && parts[1].is_empty() {
- | ^^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: literal non-ASCII character detected
- --> src/ctors.rs:117:29
- |
- 117 | ... "Edge label from ν{} to ν{} has an empty tail part: '{}'",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Edge label from \u{3bd}{} to \u{3bd}{} has an empty tail part: '{}'"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing documentation for a module
- --> src/lib.rs:52:1
- |
- 52 | mod debug;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: used import from `std` instead of `alloc`
- --> src/debug.rs:23:5
- |
- 23 | use std::fmt;
- | ^^^^^^^^
- |
- = help: consider importing the item from `alloc`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc
- = note: `#[deny(clippy::std_instead_of_alloc)]` implied by `#[deny(warnings)]`
- error: used import from `std` instead of `core`
- --> src/debug.rs:24:16
- |
- 24 | use std::fmt::{Debug, Display, Formatter};
- | ^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- = note: `#[deny(clippy::std_instead_of_core)]` implied by `#[deny(warnings)]`
- error: used import from `std` instead of `core`
- --> src/debug.rs:24:23
- |
- 24 | use std::fmt::{Debug, Display, Formatter};
- | ^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: used import from `std` instead of `core`
- --> src/debug.rs:24:32
- |
- 24 | use std::fmt::{Debug, Display, Formatter};
- | ^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: missing `#[inline]` for a method
- --> src/debug.rs:27:5
- |
- 27 | / fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- 28 | | <&Sodg as Debug>::fmt(&self, f)
- 29 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/debug.rs:28:9
- |
- 28 | <&Sodg as Debug>::fmt(&self, f)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return <&Sodg as Debug>::fmt(&self, f)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/debug.rs:28:11
- |
- 28 | <&Sodg as Debug>::fmt(&self, f)
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing `#[inline]` for a method
- --> src/debug.rs:33:5
- |
- 33 | / fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- 34 | | let mut lines = vec![];
- 35 | | for (i, v) in self.vertices.iter() {
- 36 | | let mut attrs = v
- ... |
- 46 | | f.write_str(lines.join("\n").as_str())
- 47 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/debug.rs:46:9
- |
- 46 | f.write_str(lines.join("\n").as_str())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return f.write_str(lines.join("\n").as_str())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/debug.rs:35:23
- |
- 35 | for (i, v) in self.vertices.iter() {
- | ^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.vertices`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: literal non-ASCII character detected
- --> src/debug.rs:39:34
- |
- 39 | .map(|e| format!("\n\t{} ➞ ν{}", e.a, e.to))
- | ^^^^^^^^^^^^^^ help: consider replacing the string with: `"\n\t{} \u{279e} \u{3bd}{}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/debug.rs:44:32
- |
- 44 | lines.push(format!("ν{} -> ⟦{}⟧", i, attrs.join(", ")));
- | ^^^^^^^^^^^^^ help: consider replacing the string with: `"\u{3bd}{} -> \u{27e6}{}\u{27e7}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: this method could have a `#[must_use]` attribute
- --> src/debug.rs:53:5
- |
- 53 | pub fn v_print(&self, v: u32) -> String {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn v_print(&self, v: u32) -> String`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: docs for function which may panic missing `# Panics` section
- --> src/debug.rs:53:5
- |
- 53 | pub fn v_print(&self, v: u32) -> String {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- note: first possible panic found here
- --> src/debug.rs:54:19
- |
- 54 | let vtx = self
- | ___________________^
- 55 | | .vertices
- 56 | | .get(&v)
- 57 | | .context(format!("Can't find ν{v}"))
- 58 | | .unwrap();
- | |_____________________^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
- error: missing `#[inline]` for a method
- --> src/debug.rs:53:5
- |
- 53 | / pub fn v_print(&self, v: u32) -> String {
- 54 | | let vtx = self
- 55 | | .vertices
- 56 | | .get(&v)
- ... |
- 64 | | )
- 65 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/debug.rs:60:9
- |
- 60 | / format!(
- 61 | | "ν{v}⟦{}{}⟧",
- 62 | | if vtx.data.is_empty() { "" } else { "Δ, " },
- 63 | | list.join(", ")
- 64 | | )
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 60 ~ return format!(
- 61 ~ "ν{v}⟦{}{}⟧",
- 62 ~ if vtx.data.is_empty() { "" } else { "Δ, " },
- 63 + list.join(", ")
- 64 + )
- |
- error: used `unwrap()` on a `Result` value
- --> src/debug.rs:54:19
- |
- 54 | let vtx = self
- | ___________________^
- 55 | | .vertices
- 56 | | .get(&v)
- 57 | | .context(format!("Can't find ν{v}"))
- 58 | | .unwrap();
- | |_____________________^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: literal non-ASCII character detected
- --> src/debug.rs:57:30
- |
- 57 | .context(format!("Can't find ν{v}"))
- | ^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't find \u{3bd}{v}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/debug.rs:59:58
- |
- 59 | let list: Vec<String> = vtx.edges.iter().map(|e| e.a.clone()).collect();
- | ^^^^^^^^^^^ help: add `return` as shown: `return e.a.clone()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/debug.rs:61:13
- |
- 61 | "ν{v}⟦{}{}⟧",
- | ^^^^^^^^^^^^ help: consider replacing the string with: `"\u{3bd}{v}\u{27e6}{}{}\u{27e7}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/debug.rs:62:50
- |
- 62 | if vtx.data.is_empty() { "" } else { "Δ, " },
- | ^^^^^ help: consider replacing the string with: `"\u{394}, "`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing documentation for a module
- --> src/lib.rs:53:1
- |
- 53 | mod dot;
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: this method could have a `#[must_use]` attribute
- --> src/dot.rs:52:5
- |
- 52 | pub fn to_dot(&self) -> String {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn to_dot(&self) -> String`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/dot.rs:52:5
- |
- 52 | / pub fn to_dot(&self) -> String {
- 53 | | let mut lines: Vec<String> = vec![];
- 54 | | lines.push(
- 55 | | "/* Render it at https://dreampuf.github.io/GraphvizOnline/ */
- ... |
- 98 | | lines.join("\n")
- 99 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/dot.rs:98:9
- |
- 98 | lines.join("\n")
- | ^^^^^^^^^^^^^^^^ help: add `return` as shown: `return lines.join("\n")`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `to_string()` called on a `&str`
- --> src/dot.rs:55:13
- |
- 55 | / "/* Render it at https://dreampuf.github.io/GraphvizOnline/ */
- 56 | | digraph {
- 57 | | node [fixedsize=true,width=1,fontname=\"Arial\"];
- 58 | | edge [fontname=\"Arial\"];"
- 59 | | .to_string(),
- | |____________________________^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- = note: `#[deny(clippy::str_to_string)]` implied by `#[deny(warnings)]`
- error: missing `return` statement
- --> src/dot.rs:64:37
- |
- 64 | .sorted_by_key(|(v, _)| <&u32>::clone(v))
- | ^^^^^^^^^^^^^^^^ help: add `return` as shown: `return <&u32>::clone(v)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: type of pattern does not match the expression type
- --> src/dot.rs:64:29
- |
- 64 | .sorted_by_key(|(v, _)| <&u32>::clone(v))
- | ^^^^^^
- |
- = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
- = note: `#[deny(clippy::pattern_type_mismatch)]` implied by `#[deny(warnings)]`
- error: literal non-ASCII character detected
- --> src/dot.rs:67:17
- |
- 67 | " v{v}[shape=circle,label=\"ν{v}\"{}]; {}",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `" v{v}[shape=circle,label=\"\u{3bd}{v}\"{}]; {}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: `to_string()` called on a `&str`
- --> src/dot.rs:74:21
- |
- 74 | "".to_string()
- | ^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: empty String is being created manually
- --> src/dot.rs:74:21
- |
- 74 | "".to_string()
- | ^^^^^^^^^^^^^^ help: consider using: `String::new()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new
- = note: `#[deny(clippy::manual_string_new)]` implied by `#[deny(warnings)]`
- error: missing `return` statement
- --> src/dot.rs:79:57
- |
- 79 | for e in vtx.edges.iter().sorted_by_key(|e| e.a.clone()) {
- | ^^^^^^^^^^^ help: add `return` as shown: `return e.a.clone()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/dot.rs:84:40
- |
- 84 | if e.a.starts_with('ρ') || e.a.starts_with('σ') {
- | ^^^ help: consider replacing the string with: `'\u{3c1}'`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/dot.rs:84:64
- |
- 84 | if e.a.starts_with('ρ') || e.a.starts_with('σ') {
- | ^^^ help: consider replacing the string with: `'\u{3c3}'`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/dot.rs:89:40
- |
- 89 | if e.a.starts_with('π') {
- | ^^^ help: consider replacing the string with: `'\u{3c0}'`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: `to_string()` called on a `&str`
- --> src/dot.rs:97:20
- |
- 97 | lines.push("}\n".to_string());
- | ^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: missing documentation for a module
- --> src/lib.rs:54:1
- |
- 54 | mod edge;
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: pub(crate) struct inside private module
- --> src/edge.rs:25:1
- |
- 25 | pub(crate) struct Edge {
- | ----------^^^^^^^^^^^^
- | |
- | help: consider using: `pub`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
- = note: `#[deny(clippy::redundant_pub_crate)]` implied by `#[deny(warnings)]`
- error: missing documentation for a struct field
- --> src/edge.rs:26:5
- |
- 26 | pub to: u32,
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing documentation for a struct field
- --> src/edge.rs:27:5
- |
- 27 | pub a: String,
- | ^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing documentation for an associated function
- --> src/edge.rs:31:5
- |
- 31 | / pub fn new(to: u32, a: &str) -> Edge {
- 32 | | Edge {
- 33 | | to,
- 34 | | a: a.to_string(),
- 35 | | }
- 36 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing `return` statement
- --> src/edge.rs:32:9
- |
- 32 | / Edge {
- 33 | | to,
- 34 | | a: a.to_string(),
- 35 | | }
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 32 ~ return Edge {
- 33 + to,
- 34 + a: a.to_string(),
- 35 + }
- |
- error: unnecessary structure name repetition
- --> src/edge.rs:31:37
- |
- 31 | pub fn new(to: u32, a: &str) -> Edge {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/edge.rs:32:9
- |
- 32 | Edge {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: `to_string()` called on a `&str`
- --> src/edge.rs:34:16
- |
- 34 | a: a.to_string(),
- | ^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: missing documentation for a module
- --> src/lib.rs:55:1
- |
- 55 | mod find;
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: used import from `std` instead of `alloc`
- --> src/find.rs:24:5
- |
- 24 | use std::collections::VecDeque;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `alloc`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_alloc
- error: used import from `std` instead of `core`
- --> src/find.rs:25:5
- |
- 25 | use std::str::FromStr;
- | ^^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: missing `#[inline]` for a method
- --> src/find.rs:28:5
- |
- 28 | / fn re(&self, _v: u32, _a: &str) -> Result<String> {
- 29 | | Ok(self.s.clone())
- 30 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:29:9
- |
- 29 | Ok(self.s.clone())
- | ^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(self.s.clone())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/find.rs:35:5
- |
- 35 | pub fn new(s: &str) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new(s: &str) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/find.rs:35:5
- |
- 35 | / pub fn new(s: &str) -> Self {
- 36 | | ConstRelay { s: s.to_string() }
- 37 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:36:9
- |
- 36 | ConstRelay { s: s.to_string() }
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return ConstRelay { s: s.to_string() }`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/find.rs:36:9
- |
- 36 | ConstRelay { s: s.to_string() }
- | ^^^^^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: `to_string()` called on a `&str`
- --> src/find.rs:36:25
- |
- 36 | ConstRelay { s: s.to_string() }
- | ^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: missing `#[inline]` for a method
- --> src/find.rs:41:5
- |
- 41 | / fn re(&self, v: u32, a: &str) -> Result<String> {
- 42 | | Err(anyhow!("Can't find ν{v}.{a}"))
- 43 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:42:9
- |
- 42 | Err(anyhow!("Can't find ν{v}.{a}"))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Err(anyhow!("Can't find ν{v}.{a}"))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/find.rs:42:21
- |
- 42 | Err(anyhow!("Can't find ν{v}.{a}"))
- | ^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't find \u{3bd}{v}.{a}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: this method could have a `#[must_use]` attribute
- --> src/find.rs:48:5
- |
- 48 | pub fn new() -> Self {
- | ^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn new() -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/find.rs:48:5
- |
- 48 | / pub fn new() -> Self {
- 49 | | DeadRelay {}
- 50 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:49:9
- |
- 49 | DeadRelay {}
- | ^^^^^^^^^^^^ help: add `return` as shown: `return DeadRelay {}`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this could be a `const fn`
- --> src/find.rs:48:5
- |
- 48 | / pub fn new() -> Self {
- 49 | | DeadRelay {}
- 50 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
- = note: `#[deny(clippy::missing_const_for_fn)]` implied by `#[deny(warnings)]`
- error: unnecessary structure name repetition
- --> src/find.rs:49:9
- |
- 49 | DeadRelay {}
- | ^^^^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing `#[inline]` for a method
- --> src/find.rs:56:5
- |
- 56 | / fn default() -> Self {
- 57 | | Self::new()
- 58 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:57:9
- |
- 57 | Self::new()
- | ^^^^^^^^^^^ help: add `return` as shown: `return Self::new()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `#[inline]` for a method
- --> src/find.rs:74:5
- |
- 74 | / pub fn new(lambda: fn(u32, &str) -> Result<String>) -> Self {
- 75 | | LambdaRelay { lambda }
- 76 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:75:9
- |
- 75 | LambdaRelay { lambda }
- | ^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return LambdaRelay { lambda }`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/find.rs:75:9
- |
- 75 | LambdaRelay { lambda }
- | ^^^^^^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing `#[inline]` for a method
- --> src/find.rs:80:5
- |
- 80 | / fn re(&self, v: u32, a: &str) -> Result<String> {
- 81 | | (self.lambda)(v, a)
- 82 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:81:9
- |
- 81 | (self.lambda)(v, a)
- | ^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return (self.lambda)(v, a)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: docs for function returning `Result` missing `# Errors` section
- --> src/find.rs:112:5
- |
- 112 | pub fn find<T: Relay>(&self, v1: u32, loc: &str, relay: &T) -> Result<u32> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/find.rs:112:5
- |
- 112 | / pub fn find<T: Relay>(&self, v1: u32, loc: &str, relay: &T) -> Result<u32> {
- 113 | | #[cfg(feature = "sober")]
- 114 | | let badge = format!("ν{v1}.{loc}");
- 115 | | #[cfg(feature = "sober")]
- ... |
- 136 | | v
- 137 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/find.rs:136:9
- |
- 136 | v
- | ^ help: add `return` as shown: `return v`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: backticks are unbalanced
- --> src/find.rs:141:5
- |
- 141 | /// This function is used only by [`Sodg::find].
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: a backtick may be missing a pair
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
- = note: `#[deny(clippy::doc_markdown)]` implied by `#[deny(warnings)]`
- error: used unwrap or expect in a function that returns result or option
- --> src/find.rs:142:5
- |
- 142 | / fn find_with_indent<T: Relay>(
- 143 | | &self,
- 144 | | v1: u32,
- 145 | | loc: &str,
- ... |
- 217 | | Ok(v)
- 218 | | }
- | |_____^
- |
- = help: unwrap and expect should not be used in a function that returns result or option
- note: potential non-recoverable error(s)
- --> src/find.rs:174:21
- |
- 174 | let k = next.unwrap().to_string();
- | ^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
- = note: `#[deny(clippy::unwrap_in_result)]` implied by `#[deny(warnings)]`
- error: missing `return` statement
- --> src/find.rs:217:9
- |
- 217 | Ok(v)
- | ^^^^^ help: add `return` as shown: `return Ok(v)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: default numeric fallback might occur
- --> src/find.rs:161:25
- |
- 161 | let mut jumps = 0;
- | ^ help: consider adding suffix: `0_i32`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_numeric_fallback
- = note: `#[deny(clippy::default_numeric_fallback)]` implied by `#[deny(warnings)]`
- error: default numeric fallback might occur
- --> src/find.rs:163:22
- |
- 163 | jumps += 1;
- | ^ help: consider adding suffix: `1_i32`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_numeric_fallback
- error: missing `return` statement
- --> src/find.rs:158:25
- |
- 158 | .filter(|k| !k.is_empty())
- | ^^^^^^^^^^^^^ help: add `return` as shown: `return !k.is_empty()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `to_string()` called on a `&str`
- --> src/find.rs:159:45
- |
- 159 | .for_each(|k| locator.push_back(k.to_string()));
- | ^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: literal non-ASCII character detected
- --> src/find.rs:160:22
- |
- 160 | let indent = "▷ ".repeat(depth);
- | ^^^^ help: consider replacing the string with: `"\u{25b7} "`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/find.rs:163:13
- |
- 163 | jumps += 1;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- = note: `#[deny(clippy::arithmetic_side_effects)]` implied by `#[deny(warnings)]`
- error: integer arithmetic detected
- --> src/find.rs:163:13
- |
- 163 | jumps += 1;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- = note: `#[deny(clippy::integer_arithmetic)]` implied by `#[deny(warnings)]`
- error: `to_string()` called on a `String`
- --> src/find.rs:174:21
- |
- 174 | let k = next.unwrap().to_string();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.clone()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_to_string
- = note: `#[deny(clippy::string_to_string)]` implied by `#[deny(warnings)]`
- error: used `unwrap()` on an `Option` value
- --> src/find.rs:174:21
- |
- 174 | let k = next.unwrap().to_string();
- | ^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: literal non-ASCII character detected
- --> src/find.rs:184:30
- |
- 184 | if k.starts_with('ν') {
- | ^^^ help: consider replacing the string with: `'\u{3bd}'`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: `loc` shadows a previous, unrelated binding
- --> src/find.rs:189:30
- |
- 189 | if let Some((to, loc)) = self.kid(v, k.as_str()) {
- | ^^^
- |
- note: previous binding is here
- --> src/find.rs:145:9
- |
- 145 | loc: &str,
- | ^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#shadow_unrelated
- error: literal non-ASCII character detected
- --> src/find.rs:195:20
- |
- 195 | trace!("#find(ν{v1}, {loc}): {indent}calling relay(ν{v}, {k})...");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#find(\u{3bd}{v1}, {loc}): {indent}calling relay(\u{3bd}{v}, {k})..."`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/find.rs:195:13
- |
- 195 | trace!("#find(ν{v1}, {loc}): {indent}calling relay(ν{v}, {k})...");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `trace!("#find(\u{3bd}{v1}, {loc}): {indent}calling relay(\u{3bd}{v}, {k})...")`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/find.rs:198:82
- |
- 198 | if let Ok(to) = self.find_with_indent(v, re.as_str(), relay, depth + 1) {
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/find.rs:198:82
- |
- 198 | if let Ok(to) = self.find_with_indent(v, re.as_str(), relay, depth + 1) {
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: literal non-ASCII character detected
- --> src/find.rs:199:32
- |
- 199 | trace!("#find(ν{v1}, {loc}): {indent}ν{v}.{k} relayed to ν{to} (re: {re})");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#find(\u{3bd}{v1}, {loc}): {indent}\u{3bd}{v}.{k} relayed to \u{3bd}{to} (re: {re})"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/find.rs:199:25
- |
- 199 | trace!("#find(ν{v1}, {loc}): {indent}ν{v}.{k} relayed to ν{to} (re: {re})");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `trace!("#find(\u{3bd}{v1}, {loc}): {indent}\u{3bd}{v}.{k} relayed to \u{3bd}{to} (re: {re})")`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/find.rs:207:25
- |
- 207 | "#find(ν{v1}, {loc}): '{}' from relay of .{k} in {}",
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#find(\u{3bd}{v1}, {loc}): '{}' from relay of .{k} in {}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/find.rs:206:21
- |
- 206 | / trace!(
- 207 | | "#find(ν{v1}, {loc}): '{}' from relay of .{k} in {}",
- 208 | | err,
- 209 | | self.v_print(v)
- 210 | | );
- | |_____________________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- help: consider replacing the string with
- |
- 206 ~ trace!(
- 207 + "#find(\u{3bd}{v1}, {loc}): '{}' from relay of .{k} in {}",
- 208 + err,
- 209 + self.v_print(v)
- 210 ~ );
- |
- error: literal non-ASCII character detected
- --> src/find.rs:216:16
- |
- 216 | trace!("#find(ν{v1}, {loc}): {indent}found ν{v} in {jumps} jumps");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#find(\u{3bd}{v1}, {loc}): {indent}found \u{3bd}{v} in {jumps} jumps"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/find.rs:216:9
- |
- 216 | trace!("#find(ν{v1}, {loc}): {indent}found ν{v} in {jumps} jumps");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `trace!("#find(\u{3bd}{v1}, {loc}): {indent}found \u{3bd}{v} in {jumps} jumps")`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing documentation for a module
- --> src/lib.rs:56:1
- |
- 56 | mod gc;
- | ^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing documentation for a module
- --> src/lib.rs:57:1
- |
- 57 | mod hex;
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: used import from `std` instead of `core`
- --> src/hex.rs:23:16
- |
- 23 | use std::fmt::{Debug, Display, Formatter};
- | ^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: used import from `std` instead of `core`
- --> src/hex.rs:23:23
- |
- 23 | use std::fmt::{Debug, Display, Formatter};
- | ^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: used import from `std` instead of `core`
- --> src/hex.rs:23:32
- |
- 23 | use std::fmt::{Debug, Display, Formatter};
- | ^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: used import from `std` instead of `core`
- --> src/hex.rs:24:5
- |
- 24 | use std::str::FromStr;
- | ^^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: exported enums should not be exhaustive
- --> src/hex.rs:45:1
- |
- 45 | / pub enum Hex {
- 46 | | Vector(Vec<u8>),
- 47 | | Bytes([u8; 24], usize),
- 48 | | }
- | |_^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#exhaustive_enums
- = note: `#[deny(clippy::exhaustive_enums)]` implied by `#[deny(warnings)]`
- help: try adding #[non_exhaustive]
- |
- 45 | #[non_exhaustive]
- |
- error: missing documentation for a variant
- --> src/hex.rs:46:5
- |
- 46 | Vector(Vec<u8>),
- | ^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing documentation for a variant
- --> src/hex.rs:47:5
- |
- 47 | Bytes([u8; 24], usize),
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing `#[inline]` for a method
- --> src/hex.rs:51:5
- |
- 51 | / fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
- 52 | | f.write_str(self.print().as_str())
- 53 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:52:9
- |
- 52 | f.write_str(self.print().as_str())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return f.write_str(self.print().as_str())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used import from `std` instead of `core`
- --> src/hex.rs:51:45
- |
- 51 | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
- | ^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: missing trait method provided by default: `ne`
- --> src/hex.rs:56:1
- |
- 56 | impl PartialEq for Hex {
- | ^^^^^^^^^^^^^^^^^^^^^^
- |
- help: implement the method
- --> /Users/l3r8y/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs:229:5
- |
- 229 | fn ne(&self, other: &Rhs) -> bool {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_trait_methods
- error: missing `#[inline]` for a method
- --> src/hex.rs:57:5
- |
- 57 | / fn eq(&self, other: &Self) -> bool {
- 58 | | self.bytes() == other.bytes()
- 59 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:58:9
- |
- 58 | self.bytes() == other.bytes()
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.bytes() == other.bytes()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing trait method provided by default: `assert_receiver_is_total_eq`
- --> src/hex.rs:62:1
- |
- 62 | impl Eq for Hex {}
- | ^^^^^^^^^^^^^^^
- |
- help: implement the method
- --> /Users/l3r8y/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/cmp.rs:297:5
- |
- 297 | fn assert_receiver_is_total_eq(&self) {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_trait_methods
- error: missing `#[inline]` for a method
- --> src/hex.rs:65:5
- |
- 65 | / fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
- 66 | | f.write_str(self.print().as_str())
- 67 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:66:9
- |
- 66 | f.write_str(self.print().as_str())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return f.write_str(self.print().as_str())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used import from `std` instead of `core`
- --> src/hex.rs:65:45
- |
- 65 | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
- | ^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:81:5
- |
- 81 | pub fn empty() -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn empty() -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:81:5
- |
- 81 | / pub fn empty() -> Self {
- 82 | | Self::from_vec(Vec::new())
- 83 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:82:9
- |
- 82 | Self::from_vec(Vec::new())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_vec(Vec::new())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:94:5
- |
- 94 | pub fn bytes(&self) -> &[u8] {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn bytes(&self) -> &[u8]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:94:5
- |
- 94 | / pub fn bytes(&self) -> &[u8] {
- 95 | | match self {
- 96 | | Hex::Vector(v) => v,
- 97 | | Hex::Bytes(array, size) => &array[..*size],
- 98 | | }
- 99 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:96:31
- |
- 96 | Hex::Vector(v) => v,
- | ^ help: add `return` as shown: `return v`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/hex.rs:97:40
- |
- 97 | Hex::Bytes(array, size) => &array[..*size],
- | ^^^^^^^^^^^^^^^ help: add `return` as shown: `return &array[..*size]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: type of pattern does not match the expression type
- --> src/hex.rs:96:13
- |
- 96 | Hex::Vector(v) => v,
- | ^^^^^^^^^^^^^^
- |
- = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
- error: unnecessary structure name repetition
- --> src/hex.rs:96:13
- |
- 96 | Hex::Vector(v) => v,
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/hex.rs:97:13
- |
- 97 | Hex::Bytes(array, size) => &array[..*size],
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: slicing may panic
- --> src/hex.rs:97:41
- |
- 97 | Hex::Bytes(array, size) => &array[..*size],
- | ^^^^^^^^^^^^^^
- |
- = help: consider using `.get(..n)`or `.get_mut(..n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:118:5
- |
- 118 | pub fn len(&self) -> usize {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn len(&self) -> usize`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:118:5
- |
- 118 | / pub fn len(&self) -> usize {
- 119 | | match self {
- 120 | | Hex::Vector(x) => x.len(),
- 121 | | Hex::Bytes(_, size) => *size,
- 122 | | }
- 123 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:120:31
- |
- 120 | Hex::Vector(x) => x.len(),
- | ^^^^^^^ help: add `return` as shown: `return x.len()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/hex.rs:121:36
- |
- 121 | Hex::Bytes(_, size) => *size,
- | ^^^^^ help: add `return` as shown: `return *size`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: type of pattern does not match the expression type
- --> src/hex.rs:120:13
- |
- 120 | Hex::Vector(x) => x.len(),
- | ^^^^^^^^^^^^^^
- |
- = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
- error: unnecessary structure name repetition
- --> src/hex.rs:120:13
- |
- 120 | Hex::Vector(x) => x.len(),
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/hex.rs:121:13
- |
- 121 | Hex::Bytes(_, size) => *size,
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:136:5
- |
- 136 | pub fn from_slice(slice: &[u8]) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn from_slice(slice: &[u8]) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:136:5
- |
- 136 | / pub fn from_slice(slice: &[u8]) -> Self {
- 137 | | if slice.len() <= 24 {
- 138 | | Self::Bytes(
- 139 | | {
- ... |
- 148 | | }
- 149 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:138:13
- |
- 138 | / Self::Bytes(
- 139 | | {
- 140 | | let mut x = [0; 24];
- 141 | | x[..slice.len()].copy_from_slice(slice);
- ... |
- 144 | | slice.len(),
- 145 | | )
- | |_____________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 138 ~ return Self::Bytes(
- 139 + {
- 140 + let mut x = [0; 24];
- 141 + x[..slice.len()].copy_from_slice(slice);
- 142 + x
- 143 + },
- 144 + slice.len(),
- 145 + )
- |
- error: missing `return` statement
- --> src/hex.rs:147:13
- |
- 147 | Self::Vector(slice.to_vec())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::Vector(slice.to_vec())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: slicing may panic
- --> src/hex.rs:141:21
- |
- 141 | x[..slice.len()].copy_from_slice(slice);
- | ^^^^^^^^^^^^^^^^
- |
- = help: consider using `.get(..n)`or `.get_mut(..n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:160:5
- |
- 160 | pub fn from_vec(bytes: Vec<u8>) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn from_vec(bytes: Vec<u8>) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:160:5
- |
- 160 | / pub fn from_vec(bytes: Vec<u8>) -> Self {
- 161 | | if bytes.len() <= 24 {
- 162 | | Self::from_slice(&bytes)
- 163 | | } else {
- 164 | | Self::Vector(bytes)
- 165 | | }
- 166 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:162:13
- |
- 162 | Self::from_slice(&bytes)
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_slice(&bytes)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/hex.rs:164:13
- |
- 164 | Self::Vector(bytes)
- | ^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::Vector(bytes)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:177:5
- |
- 177 | pub fn from_string_bytes(d: String) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn from_string_bytes(d: String) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:177:5
- |
- 177 | / pub fn from_string_bytes(d: String) -> Self {
- 178 | | Self::from_slice(d.as_bytes())
- 179 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:178:9
- |
- 178 | Self::from_slice(d.as_bytes())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_slice(d.as_bytes())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this argument is passed by value, but not consumed in the function body
- --> src/hex.rs:177:33
- |
- 177 | pub fn from_string_bytes(d: String) -> Self {
- | ^^^^^^ help: consider changing the type to: `&str`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:190:5
- |
- 190 | pub fn from_str_bytes(d: &str) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn from_str_bytes(d: &str) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:190:5
- |
- 190 | / pub fn from_str_bytes(d: &str) -> Self {
- 191 | | Self::from_slice(d.as_bytes())
- 192 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:191:9
- |
- 191 | Self::from_slice(d.as_bytes())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_slice(d.as_bytes())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:203:5
- |
- 203 | pub fn is_empty(&self) -> bool {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_empty(&self) -> bool`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:203:5
- |
- 203 | / pub fn is_empty(&self) -> bool {
- 204 | | self.len() == 0
- 205 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:204:9
- |
- 204 | self.len() == 0
- | ^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.len() == 0`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: docs for function returning `Result` missing `# Errors` section
- --> src/hex.rs:216:5
- |
- 216 | pub fn to_bool(&self) -> Result<bool> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/hex.rs:216:5
- |
- 216 | / pub fn to_bool(&self) -> Result<bool> {
- 217 | | Ok(self.bytes()[0] == 0x01)
- 218 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:217:9
- |
- 217 | Ok(self.bytes()[0] == 0x01)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(self.bytes()[0] == 0x01)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: indexing may panic
- --> src/hex.rs:217:12
- |
- 217 | Ok(self.bytes()[0] == 0x01)
- | ^^^^^^^^^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: docs for function returning `Result` missing `# Errors` section
- --> src/hex.rs:229:5
- |
- 229 | pub fn to_i64(&self) -> Result<i64> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/hex.rs:229:5
- |
- 229 | / pub fn to_i64(&self) -> Result<i64> {
- 230 | | let a: &[u8; 8] = &self.bytes().try_into().context(format!(
- 231 | | "There is not enough bytes, can't make INT (just {} while we need eight)",
- 232 | | self.bytes().len()
- 233 | | ))?;
- 234 | | Ok(i64::from_be_bytes(*a))
- 235 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:234:9
- |
- 234 | Ok(i64::from_be_bytes(*a))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(i64::from_be_bytes(*a))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: docs for function returning `Result` missing `# Errors` section
- --> src/hex.rs:246:5
- |
- 246 | pub fn to_f64(&self) -> Result<f64> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/hex.rs:246:5
- |
- 246 | / pub fn to_f64(&self) -> Result<f64> {
- 247 | | let a: &[u8; 8] = &self.bytes().try_into().context(format!(
- 248 | | "There is not enough bytes, can't make FLOAT (just {} while we need eight)",
- 249 | | self.bytes().len()
- 250 | | ))?;
- 251 | | Ok(f64::from_be_bytes(*a))
- 252 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:251:9
- |
- 251 | Ok(f64::from_be_bytes(*a))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(f64::from_be_bytes(*a))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: docs for function returning `Result` missing `# Errors` section
- --> src/hex.rs:263:5
- |
- 263 | pub fn to_utf8(&self) -> Result<String> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/hex.rs:263:5
- |
- 263 | / pub fn to_utf8(&self) -> Result<String> {
- 264 | | String::from_utf8(self.bytes().to_vec()).context(format!(
- 265 | | "The string inside Hex is not UTF-8 ({} bytes)",
- 266 | | self.len()
- 267 | | ))
- 268 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:264:9
- |
- 264 | / String::from_utf8(self.bytes().to_vec()).context(format!(
- 265 | | "The string inside Hex is not UTF-8 ({} bytes)",
- 266 | | self.len()
- 267 | | ))
- | |__________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 264 ~ return String::from_utf8(self.bytes().to_vec()).context(format!(
- 265 + "The string inside Hex is not UTF-8 ({} bytes)",
- 266 + self.len()
- 267 + ))
- |
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:295:5
- |
- 295 | pub fn print(&self) -> String {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn print(&self) -> String`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:295:5
- |
- 295 | / pub fn print(&self) -> String {
- 296 | | if self.bytes().is_empty() {
- 297 | | "--".to_string()
- 298 | | } else {
- ... |
- 304 | | }
- 305 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:297:13
- |
- 297 | "--".to_string()
- | ^^^^^^^^^^^^^^^^ help: add `return` as shown: `return "--".to_string()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/hex.rs:299:13
- |
- 299 | / self.bytes()
- 300 | | .iter()
- 301 | | .map(|b| format!("{b:02X}"))
- 302 | | .collect::<Vec<String>>()
- 303 | | .join("-")
- | |__________________________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 299 ~ return self.bytes()
- 300 + .iter()
- 301 + .map(|b| format!("{b:02X}"))
- 302 + .collect::<Vec<String>>()
- 303 + .join("-")
- |
- error: `to_string()` called on a `&str`
- --> src/hex.rs:297:13
- |
- 297 | "--".to_string()
- | ^^^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:308:5
- |
- 308 | pub fn to_vec(&self) -> Vec<u8> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn to_vec(&self) -> Vec<u8>`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:308:5
- |
- 308 | / pub fn to_vec(&self) -> Vec<u8> {
- 309 | | self.bytes().to_vec()
- 310 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:309:9
- |
- 309 | self.bytes().to_vec()
- | ^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.bytes().to_vec()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:322:5
- |
- 322 | pub fn byte_at(&self, pos: usize) -> u8 {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn byte_at(&self, pos: usize) -> u8`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:322:5
- |
- 322 | / pub fn byte_at(&self, pos: usize) -> u8 {
- 323 | | self.bytes()[pos]
- 324 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:323:9
- |
- 323 | self.bytes()[pos]
- | ^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.bytes()[pos]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: indexing may panic
- --> src/hex.rs:323:9
- |
- 323 | self.bytes()[pos]
- | ^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:336:5
- |
- 336 | pub fn tail(&self, skip: usize) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn tail(&self, skip: usize) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:336:5
- |
- 336 | / pub fn tail(&self, skip: usize) -> Self {
- 337 | | Self::from_vec(self.bytes()[skip..].to_vec())
- 338 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:337:9
- |
- 337 | Self::from_vec(self.bytes()[skip..].to_vec())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_vec(self.bytes()[skip..].to_vec())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `#[must_use]` attribute on a method returning `Self`
- --> src/hex.rs:336:5
- |
- 336 | / pub fn tail(&self, skip: usize) -> Self {
- 337 | | Self::from_vec(self.bytes()[skip..].to_vec())
- 338 | | }
- | |_____^
- |
- = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
- = note: `#[deny(clippy::return_self_not_must_use)]` implied by `#[deny(warnings)]`
- error: slicing may panic
- --> src/hex.rs:337:24
- |
- 337 | Self::from_vec(self.bytes()[skip..].to_vec())
- | ^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.get(n..)` or .get_mut(n..)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: this method could have a `#[must_use]` attribute
- --> src/hex.rs:351:5
- |
- 351 | pub fn concat(&self, h: Self) -> Self {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn concat(&self, h: Self) -> Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/hex.rs:351:5
- |
- 351 | / pub fn concat(&self, h: Self) -> Self {
- 352 | | match &self {
- 353 | | Hex::Vector(v) => {
- 354 | | let mut vx = v.clone();
- ... |
- 370 | | }
- 371 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:356:17
- |
- 356 | Hex::Vector(vx)
- | ^^^^^^^^^^^^^^^ help: add `return` as shown: `return Hex::Vector(vx)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/hex.rs:362:21
- |
- 362 | Hex::Bytes(bytes, l + h.len())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Hex::Bytes(bytes, l + h.len())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/hex.rs:367:21
- |
- 367 | Hex::Vector(v)
- | ^^^^^^^^^^^^^^ help: add `return` as shown: `return Hex::Vector(v)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this argument is passed by value, but not consumed in the function body
- --> src/hex.rs:351:29
- |
- 351 | pub fn concat(&self, h: Self) -> Self {
- | ^^^^ help: consider taking a reference instead: `&Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
- error: missing `#[must_use]` attribute on a method returning `Self`
- --> src/hex.rs:351:5
- |
- 351 | / pub fn concat(&self, h: Self) -> Self {
- 352 | | match &self {
- 353 | | Hex::Vector(v) => {
- 354 | | let mut vx = v.clone();
- ... |
- 370 | | }
- 371 | | }
- | |_____^
- |
- = help: consider adding the `#[must_use]` attribute to the method or directly to the `Self` type
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#return_self_not_must_use
- error: type of pattern does not match the expression type
- --> src/hex.rs:353:13
- |
- 353 | Hex::Vector(v) => {
- | ^^^^^^^^^^^^^^
- |
- = help: use `*` to dereference the match expression or explicitly match against a `&_` pattern and adjust the enclosed variable bindings
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
- error: unnecessary structure name repetition
- --> src/hex.rs:353:13
- |
- 353 | Hex::Vector(v) => {
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/hex.rs:356:17
- |
- 356 | Hex::Vector(vx)
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/hex.rs:358:13
- |
- 358 | Hex::Bytes(b, l) => {
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/hex.rs:359:20
- |
- 359 | if l + h.len() <= 24 {
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/hex.rs:359:20
- |
- 359 | if l + h.len() <= 24 {
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: slicing may panic
- --> src/hex.rs:361:21
- |
- 361 | bytes[*l..*l + h.len()].copy_from_slice(h.bytes());
- | ^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/hex.rs:361:31
- |
- 361 | bytes[*l..*l + h.len()].copy_from_slice(h.bytes());
- | ^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/hex.rs:361:31
- |
- 361 | bytes[*l..*l + h.len()].copy_from_slice(h.bytes());
- | ^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: unnecessary structure name repetition
- --> src/hex.rs:362:21
- |
- 362 | Hex::Bytes(bytes, l + h.len())
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/hex.rs:362:39
- |
- 362 | Hex::Bytes(bytes, l + h.len())
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/hex.rs:362:39
- |
- 362 | Hex::Bytes(bytes, l + h.len())
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: unnecessary structure name repetition
- --> src/hex.rs:367:21
- |
- 367 | Hex::Vector(v)
- | ^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing `#[inline]` for a method
- --> src/hex.rs:384:5
- |
- 384 | / fn from(d: i64) -> Self {
- 385 | | Self::from_slice(&d.to_be_bytes())
- 386 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:385:9
- |
- 385 | Self::from_slice(&d.to_be_bytes())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_slice(&d.to_be_bytes())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `#[inline]` for a method
- --> src/hex.rs:400:5
- |
- 400 | / fn from(d: f64) -> Self {
- 401 | | Self::from_slice(&d.to_be_bytes())
- 402 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:401:9
- |
- 401 | Self::from_slice(&d.to_be_bytes())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_slice(&d.to_be_bytes())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `#[inline]` for a method
- --> src/hex.rs:415:5
- |
- 415 | / fn from(d: bool) -> Self {
- 416 | | Self::from_slice(&(if d { [1] } else { [0] }))
- 417 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:416:9
- |
- 416 | Self::from_slice(&(if d { [1] } else { [0] }))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::from_slice(&(if d { [1] } else { [0] }))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `#[inline]` for a method
- --> src/hex.rs:448:5
- |
- 448 | / fn from_str(hex: &str) -> std::result::Result<Self, Self::Err> {
- 449 | | let s = hex.replace('-', "");
- 450 | | Ok(Self::from_vec(hex::decode(s)?))
- 451 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/hex.rs:450:9
- |
- 450 | Ok(Self::from_vec(hex::decode(s)?))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(Self::from_vec(hex::decode(s)?))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used import from `std` instead of `core`
- --> src/hex.rs:448:31
- |
- 448 | fn from_str(hex: &str) -> std::result::Result<Self, Self::Err> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: missing documentation for a module
- --> src/lib.rs:58:1
- |
- 58 | mod inspect;
- | ^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: docs for function returning `Result` missing `# Errors` section
- --> src/inspect.rs:32:5
- |
- 32 | pub fn inspect(&self, loc: &str) -> Result<String> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/inspect.rs:32:5
- |
- 32 | / pub fn inspect(&self, loc: &str) -> Result<String> {
- 33 | | let v = self
- 34 | | .find(0, loc, &DeadRelay::default())
- 35 | | .context(format!("Can't locate '{loc}'"))?;
- ... |
- 42 | | ))
- 43 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/inspect.rs:37:9
- |
- 37 | / Ok(format!(
- 38 | | "{}/ν{}\n{}",
- 39 | | loc,
- 40 | | v,
- 41 | | self.inspect_v(v, &mut seen)?.join("\n")
- 42 | | ))
- | |__________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 37 ~ return Ok(format!(
- 38 ~ "{}/ν{}\n{}",
- 39 + loc,
- 40 + v,
- 41 + self.inspect_v(v, &mut seen)?.join("\n")
- 42 + ))
- |
- error: literal non-ASCII character detected
- --> src/inspect.rs:38:13
- |
- 38 | "{}/ν{}\n{}",
- | ^^^^^^^^^^^^ help: consider replacing the string with: `"{}/\u{3bd}{}\n{}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing documentation for an associated function
- --> src/inspect.rs:45:5
- |
- 45 | / fn inspect_v(&self, v: u32, seen: &mut HashSet<u32>) -> Result<Vec<String>> {
- 46 | | seen.insert(v);
- 47 | | let mut lines = vec![];
- 48 | | self.vertices
- ... |
- 75 | | Ok(lines)
- 76 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing `return` statement
- --> src/inspect.rs:75:9
- |
- 75 | Ok(lines)
- | ^^^^^^^^^ help: add `return` as shown: `return Ok(lines)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/inspect.rs:50:30
- |
- 50 | .context(format!("Can't find ν{v}"))?
- | ^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't find \u{3bd}{v}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/inspect.rs:57:21
- |
- 57 | " .{} ➞ ν{}{}",
- | ^^^^^^^^^^^^^^^ help: consider replacing the string with: `" .{} \u{279e} \u{3bd}{}{}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: `to_string()` called on a `&str`
- --> src/inspect.rs:61:25
- |
- 61 | "…".to_string()
- | ^^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: literal non-ASCII character detected
- --> src/inspect.rs:61:25
- |
- 61 | "…".to_string()
- | ^^^ help: consider replacing the string with: `"\u{2026}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: `to_string()` called on a `&str`
- --> src/inspect.rs:63:25
- |
- 63 | "".to_string()
- | ^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: empty String is being created manually
- --> src/inspect.rs:63:25
- |
- 63 | "".to_string()
- | ^^^^^^^^^^^^^^ help: consider using: `String::new()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_string_new
- error: used `unwrap()` on a `Result` value
- --> src/inspect.rs:69:21
- |
- 69 | / self.inspect_v(e.to, seen)
- 70 | | .unwrap()
- | |_________________________________^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: missing documentation for a module
- --> src/lib.rs:59:1
- |
- 59 | mod merge;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: docs for function returning `Result` missing `# Errors` section
- --> src/merge.rs:32:5
- |
- 32 | pub fn merge(&mut self, g: &Sodg, left: u32, right: u32) -> Result<()> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/merge.rs:32:5
- |
- 32 | / pub fn merge(&mut self, g: &Sodg, left: u32, right: u32) -> Result<()> {
- 33 | | let mut mapped = HashMap::new();
- 34 | | let before = self.vertices.len();
- 35 | | self.merge_rec(g, left, right, &mut mapped)?;
- ... |
- 48 | | Ok(())
- 49 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/merge.rs:48:9
- |
- 48 | Ok(())
- | ^^^^^^ help: add `return` as shown: `return Ok(())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/merge.rs:32:33
- |
- 32 | pub fn merge(&mut self, g: &Sodg, left: u32, right: u32) -> Result<()> {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: used unwrap or expect in a function that returns result or option
- --> src/merge.rs:52:5
- |
- 52 | / fn merge_rec(
- 53 | | &mut self,
- 54 | | g: &Sodg,
- 55 | | left: u32,
- ... |
- 79 | | Ok(())
- 80 | | }
- | |_____^
- |
- = help: unwrap and expect should not be used in a function that returns result or option
- note: potential non-recoverable error(s)
- --> src/merge.rs:63:24
- |
- 63 | self.put(left, g.vertices.get(&right).unwrap().data.clone())?;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
- error: missing `return` statement
- --> src/merge.rs:79:9
- |
- 79 | Ok(())
- | ^^^^^^ help: add `return` as shown: `return Ok(())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/merge.rs:54:13
- |
- 54 | g: &Sodg,
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/merge.rs:63:24
- |
- 63 | self.put(left, g.vertices.get(&right).unwrap().data.clone())?;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&g.vertices[&right]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- error: used `unwrap()` on an `Option` value
- --> src/merge.rs:63:24
- |
- 63 | self.put(left, g.vertices.get(&right).unwrap().data.clone())?;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: consider adding a `;` to the last statement for consistent formatting
- --> src/merge.rs:77:13
- |
- 77 | self.merge_rec(g, target, to, mapped)?
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `self.merge_rec(g, target, to, mapped)?;`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
- = note: `#[deny(clippy::semicolon_if_nothing_returned)]` implied by `#[deny(warnings)]`
- error: missing documentation for a module
- --> src/lib.rs:60:1
- |
- 60 | mod misc;
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: this method could have a `#[must_use]` attribute
- --> src/misc.rs:25:5
- |
- 25 | pub fn len(&self) -> usize {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn len(&self) -> usize`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/misc.rs:25:5
- |
- 25 | / pub fn len(&self) -> usize {
- 26 | | self.vertices.len()
- 27 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/misc.rs:26:9
- |
- 26 | self.vertices.len()
- | ^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.vertices.len()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/misc.rs:42:5
- |
- 42 | pub fn is_empty(&self) -> bool {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn is_empty(&self) -> bool`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/misc.rs:42:5
- |
- 42 | / pub fn is_empty(&self) -> bool {
- 43 | | self.vertices.is_empty()
- 44 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/misc.rs:43:9
- |
- 43 | self.vertices.is_empty()
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.vertices.is_empty()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing documentation for a module
- --> src/lib.rs:61:1
- |
- 61 | mod next;
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing `#[inline]` for a method
- --> src/next.rs:28:5
- |
- 28 | / pub fn next_id(&mut self) -> u32 {
- 29 | | let mut id = self.next_v;
- 30 | | for v in self.vertices.keys() {
- 31 | | if *v >= id {
- ... |
- 36 | | id
- 37 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/next.rs:36:9
- |
- 36 | id
- | ^^ help: add `return` as shown: `return id`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/next.rs:32:22
- |
- 32 | id = *v + 1;
- | ^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/next.rs:32:22
- |
- 32 | id = *v + 1;
- | ^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/next.rs:35:23
- |
- 35 | self.next_v = id + 1;
- | ^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/next.rs:35:23
- |
- 35 | self.next_v = id + 1;
- | ^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: missing documentation for a module
- --> src/lib.rs:62:1
- |
- 62 | mod ops;
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: docs for function returning `Result` missing `# Errors` section
- --> src/ops.rs:43:5
- |
- 43 | pub fn add(&mut self, v1: u32) -> Result<()> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/ops.rs:43:5
- |
- 43 | / pub fn add(&mut self, v1: u32) -> Result<()> {
- 44 | | if self.vertices.contains_key(&v1) {
- 45 | | return Ok(());
- 46 | | }
- ... |
- 50 | | Ok(())
- 51 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ops.rs:50:9
- |
- 50 | Ok(())
- | ^^^^^^ help: add `return` as shown: `return Ok(())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/ops.rs:49:16
- |
- 49 | trace!("#add(ν{}): new vertex added", v1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#add(\u{3bd}{}): new vertex added"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ops.rs:49:9
- |
- 49 | trace!("#add(ν{}): new vertex added", v1);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `trace!("#add(\u{3bd}{}): new vertex added", v1)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: docs for function returning `Result` missing `# Errors` section
- --> src/ops.rs:73:5
- |
- 73 | pub fn bind(&mut self, v1: u32, v2: u32, a: &str) -> Result<()> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/ops.rs:73:5
- |
- 73 | / pub fn bind(&mut self, v1: u32, v2: u32, a: &str) -> Result<()> {
- 74 | | let vtx1 = self
- 75 | | .vertices
- 76 | | .get_mut(&v1)
- ... |
- 88 | | Ok(())
- 89 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ops.rs:88:9
- |
- 88 | Ok(())
- | ^^^^^^ help: add `return` as shown: `return Ok(())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/ops.rs:77:30
- |
- 77 | .context(format!("Can't depart from ν{v1}, it's absent"))?;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't depart from \u{3bd}{v1}, it's absent"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/ops.rs:79:25
- |
- 79 | .retain(|e| Self::split_a(&e.a).0 != Self::split_a(a).0);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::split_a(&e.a).0 != Self::split_a(a).0`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/ops.rs:84:30
- |
- 84 | .context(format!("Can't arrive at ν{v2}, it's absent"))?;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't arrive at \u{3bd}{v2}, it's absent"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ops.rs:87:16
- |
- 87 | trace!("#bind: edge added ν{}.{} → ν{}", v1, a, v2);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#bind: edge added \u{3bd}{}.{} \u{2192} \u{3bd}{}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ops.rs:87:9
- |
- 87 | trace!("#bind: edge added ν{}.{} → ν{}", v1, a, v2);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `trace!("#bind: edge added \u{3bd}{}.{} \u{2192} \u{3bd}{}", v1, a, v2)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: docs for function returning `Result` missing `# Errors` section
- --> src/ops.rs:104:5
- |
- 104 | pub fn put(&mut self, v: u32, d: Hex) -> Result<()> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/ops.rs:104:5
- |
- 104 | / pub fn put(&mut self, v: u32, d: Hex) -> Result<()> {
- 105 | | let vtx = self
- 106 | | .vertices
- 107 | | .get_mut(&v)
- ... |
- 112 | | Ok(())
- 113 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ops.rs:112:9
- |
- 112 | Ok(())
- | ^^^^^^ help: add `return` as shown: `return Ok(())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this argument is passed by value, but not consumed in the function body
- --> src/ops.rs:104:38
- |
- 104 | pub fn put(&mut self, v: u32, d: Hex) -> Result<()> {
- | ^^^ help: consider taking a reference instead: `&Hex`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
- error: literal non-ASCII character detected
- --> src/ops.rs:108:30
- |
- 108 | .context(format!("Can't find ν{v}"))?;
- | ^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't find \u{3bd}{v}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ops.rs:111:16
- |
- 111 | trace!("#data: data of ν{v} set to {d}");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"#data: data of \u{3bd}{v} set to {d}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: literal non-ASCII character detected
- --> src/ops.rs:111:9
- |
- 111 | trace!("#data: data of ν{v} set to {d}");
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `trace!("#data: data of \u{3bd}{v} set to {d}")`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: docs for function returning `Result` missing `# Errors` section
- --> src/ops.rs:141:5
- |
- 141 | pub fn data(&mut self, v: u32) -> Result<Hex> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/ops.rs:141:5
- |
- 141 | / pub fn data(&mut self, v: u32) -> Result<Hex> {
- 142 | | let vtx = self
- 143 | | .vertices
- 144 | | .get_mut(&v)
- ... |
- 150 | | Ok(data)
- 151 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ops.rs:150:9
- |
- 150 | Ok(data)
- | ^^^^^^^^ help: add `return` as shown: `return Ok(data)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/ops.rs:145:30
- |
- 145 | .context(format!("Can't find ν{v}"))?;
- | ^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't find \u{3bd}{v}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: docs for function returning `Result` missing `# Errors` section
- --> src/ops.rs:184:5
- |
- 184 | pub fn kids(&self, v: u32) -> Result<Vec<(String, String, u32)>> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/ops.rs:184:5
- |
- 184 | / pub fn kids(&self, v: u32) -> Result<Vec<(String, String, u32)>> {
- 185 | | let vtx = self.vertices.get(&v).context(format!("Can't find ν{v}"))?;
- 186 | | let kids = vtx
- 187 | | .edges
- ... |
- 194 | | Ok(kids)
- 195 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ops.rs:194:9
- |
- 194 | Ok(kids)
- | ^^^^^^^^ help: add `return` as shown: `return Ok(kids)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: literal non-ASCII character detected
- --> src/ops.rs:185:57
- |
- 185 | let vtx = self.vertices.get(&v).context(format!("Can't find ν{v}"))?;
- | ^^^^^^^^^^^^^^^^^ help: consider replacing the string with: `"Can't find \u{3bd}{v}"`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/ops.rs:191:17
- |
- 191 | (p.0, p.1, x.to)
- | ^^^^^^^^^^^^^^^^ help: add `return` as shown: `return (p.0, p.1, x.to)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this method could have a `#[must_use]` attribute
- --> src/ops.rs:212:5
- |
- 212 | pub fn kid(&self, v: u32, a: &str) -> Option<(u32, String)> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn kid(&self, v: u32, a: &str) -> Option<(u32, String)>`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/ops.rs:212:5
- |
- 212 | / pub fn kid(&self, v: u32, a: &str) -> Option<(u32, String)> {
- 213 | | if let Some(vtx) = self.vertices.get(&v) {
- 214 | | vtx.edges
- 215 | | .iter()
- ... |
- 220 | | }
- 221 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/ops.rs:214:13
- |
- 214 | / vtx.edges
- 215 | | .iter()
- 216 | | .find(|e| Self::split_a(&e.a).0 == Self::split_a(a).0)
- 217 | | .map(|e| (e.to, Self::split_a(&e.a).1))
- | |_______________________________________________________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 214 ~ return vtx.edges
- 215 + .iter()
- 216 + .find(|e| Self::split_a(&e.a).0 == Self::split_a(a).0)
- 217 + .map(|e| (e.to, Self::split_a(&e.a).1))
- |
- error: missing `return` statement
- --> src/ops.rs:219:13
- |
- 219 | None
- | ^^^^ help: add `return` as shown: `return None`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: use Option::map_or instead of an if let/else
- --> src/ops.rs:213:9
- |
- 213 | / if let Some(vtx) = self.vertices.get(&v) {
- 214 | | vtx.edges
- 215 | | .iter()
- 216 | | .find(|e| Self::split_a(&e.a).0 == Self::split_a(a).0)
- ... |
- 219 | | None
- 220 | | }
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_if_let_else
- = note: `#[deny(clippy::option_if_let_else)]` implied by `#[deny(warnings)]`
- help: try
- |
- 213 ~ self.vertices.get(&v).map_or(None, |vtx| vtx.edges
- 214 + .iter()
- 215 + .find(|e| Self::split_a(&e.a).0 == Self::split_a(a).0)
- 216 + .map(|e| (e.to, Self::split_a(&e.a).1)))
- |
- error: missing `return` statement
- --> src/ops.rs:216:27
- |
- 216 | .find(|e| Self::split_a(&e.a).0 == Self::split_a(a).0)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Self::split_a(&e.a).0 == Self::split_a(a).0`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/ops.rs:217:26
- |
- 217 | .map(|e| (e.to, Self::split_a(&e.a).1))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return (e.to, Self::split_a(&e.a).1)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/ops.rs:226:9
- |
- 226 | / (
- 227 | | s.first().unwrap().to_string(),
- 228 | | s.get(1).unwrap_or(&"").to_string(),
- 229 | | )
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 226 ~ return (
- 227 + s.first().unwrap().to_string(),
- 228 + s.get(1).unwrap_or(&"").to_string(),
- 229 + )
- |
- error: calling `to_string` on `&&str`
- --> src/ops.rs:227:13
- |
- 227 | s.first().unwrap().to_string(),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*s.first().unwrap()).to_string()`
- |
- = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inefficient_to_string
- = note: `#[deny(clippy::inefficient_to_string)]` implied by `#[deny(warnings)]`
- error: used `unwrap()` on an `Option` value
- --> src/ops.rs:227:13
- |
- 227 | s.first().unwrap().to_string(),
- | ^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: calling `to_string` on `&&str`
- --> src/ops.rs:228:13
- |
- 228 | s.get(1).unwrap_or(&"").to_string(),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*s.get(1).unwrap_or(&"")).to_string()`
- |
- = help: `&str` implements `ToString` through a slower blanket impl, but `str` has a fast specialization of `ToString`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inefficient_to_string
- error: missing documentation for a module
- --> src/lib.rs:63:1
- |
- 63 | mod script;
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: used import from `std` instead of `core`
- --> src/script.rs:28:5
- |
- 28 | use std::str::FromStr;
- | ^^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: missing documentation for a struct field
- --> src/script.rs:45:5
- |
- 45 | txt: String,
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing documentation for a struct field
- --> src/script.rs:46:5
- |
- 46 | vars: HashMap<String, u32>,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: this method could have a `#[must_use]` attribute
- --> src/script.rs:73:5
- |
- 73 | pub fn from_str(s: &str) -> Script {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn from_str(s: &str) -> Script`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/script.rs:73:5
- |
- 73 | / pub fn from_str(s: &str) -> Script {
- 74 | | Script {
- 75 | | txt: s.to_string(),
- 76 | | vars: HashMap::new(),
- 77 | | }
- 78 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/script.rs:74:9
- |
- 74 | / Script {
- 75 | | txt: s.to_string(),
- 76 | | vars: HashMap::new(),
- 77 | | }
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 74 ~ return Script {
- 75 + txt: s.to_string(),
- 76 + vars: HashMap::new(),
- 77 + }
- |
- error: unnecessary structure name repetition
- --> src/script.rs:73:33
- |
- 73 | pub fn from_str(s: &str) -> Script {
- | ^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/script.rs:74:9
- |
- 74 | Script {
- | ^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: `to_string()` called on a `&str`
- --> src/script.rs:75:18
- |
- 75 | txt: s.to_string(),
- | ^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: this method could have a `#[must_use]` attribute
- --> src/script.rs:81:5
- |
- 81 | pub fn from_string(s: String) -> Script {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add the attribute: `#[must_use] pub fn from_string(s: String) -> Script`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_candidate
- error: missing `#[inline]` for a method
- --> src/script.rs:81:5
- |
- 81 | / pub fn from_string(s: String) -> Script {
- 82 | | Script::from_str(s.as_str())
- 83 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/script.rs:82:9
- |
- 82 | Script::from_str(s.as_str())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Script::from_str(s.as_str())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: this argument is passed by value, but not consumed in the function body
- --> src/script.rs:81:27
- |
- 81 | pub fn from_string(s: String) -> Script {
- | ^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
- help: consider changing the type to
- |
- 81 | pub fn from_string(s: &str) -> Script {
- | ~~~~
- help: change `s.as_str()` to
- |
- 82 | Script::from_str(s)
- | ~
- error: unnecessary structure name repetition
- --> src/script.rs:81:38
- |
- 81 | pub fn from_string(s: String) -> Script {
- | ^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: unnecessary structure name repetition
- --> src/script.rs:82:9
- |
- 82 | Script::from_str(s.as_str())
- | ^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: docs for function returning `Result` missing `# Errors` section
- --> src/script.rs:86:5
- |
- 86 | pub fn deploy_to(&mut self, g: &mut Sodg) -> Result<usize> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/script.rs:86:5
- |
- 86 | / pub fn deploy_to(&mut self, g: &mut Sodg) -> Result<usize> {
- 87 | | let mut pos = 0;
- 88 | | for cmd in self.commands().iter() {
- 89 | | trace!("#deploy_to: deploying command no.{} '{}'...", pos + 1, cmd);
- ... |
- 94 | | Ok(pos)
- 95 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/script.rs:94:9
- |
- 94 | Ok(pos)
- | ^^^^^^^ help: add `return` as shown: `return Ok(pos)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/script.rs:88:20
- |
- 88 | for cmd in self.commands().iter() {
- | ^^^^^^^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&self.commands()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/script.rs:89:67
- |
- 89 | trace!("#deploy_to: deploying command no.{} '{}'...", pos + 1, cmd);
- | ^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/script.rs:89:67
- |
- 89 | trace!("#deploy_to: deploying command no.{} '{}'...", pos + 1, cmd);
- | ^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/script.rs:92:13
- |
- 92 | pos += 1;
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/script.rs:92:13
- |
- 92 | pos += 1;
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: missing `return` statement
- --> src/script.rs:104:9
- |
- 104 | / clean
- 105 | | .split(';')
- 106 | | .map(|t| t.trim())
- 107 | | .filter(|t| !t.is_empty())
- 108 | | .map(|t| t.to_string())
- 109 | | .collect()
- | |______________________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 104 ~ return clean
- 105 + .split(';')
- 106 + .map(|t| t.trim())
- 107 + .filter(|t| !t.is_empty())
- 108 + .map(|t| t.to_string())
- 109 + .collect()
- |
- error: used `unwrap()` on a `Result` value
- --> src/script.rs:100:48
- |
- 100 | static ref STRIP_COMMENTS: Regex = Regex::new("#.*\n").unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: redundant closure
- --> src/script.rs:106:18
- |
- 106 | .map(|t| t.trim())
- | ^^^^^^^^^^^^ help: replace the closure with the method itself: `str::trim`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
- = note: `#[deny(clippy::redundant_closure_for_method_calls)]` implied by `#[deny(warnings)]`
- error: missing `return` statement
- --> src/script.rs:106:22
- |
- 106 | .map(|t| t.trim())
- | ^^^^^^^^ help: add `return` as shown: `return t.trim()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/script.rs:107:25
- |
- 107 | .filter(|t| !t.is_empty())
- | ^^^^^^^^^^^^^ help: add `return` as shown: `return !t.is_empty()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: redundant closure
- --> src/script.rs:108:18
- |
- 108 | .map(|t| t.to_string())
- | ^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::string::ToString::to_string`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
- error: missing `return` statement
- --> src/script.rs:108:22
- |
- 108 | .map(|t| t.to_string())
- | ^^^^^^^^^^^^^ help: add `return` as shown: `return t.to_string()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `to_string()` called on a `&str`
- --> src/script.rs:108:22
- |
- 108 | .map(|t| t.to_string())
- | ^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: missing `return` statement
- --> src/script.rs:127:17
- |
- 127 | g.add(v).context(format!("Failed to ADD({})", &args[0]))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return g.add(v).context(format!("Failed to ADD({})", &args[0]))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/script.rs:133:17
- |
- 133 | / g.bind(v1, v2, a).context(format!(
- 134 | | "Failed to BIND({}, {}, {})",
- 135 | | &args[0], &args[1], &args[2]
- 136 | | ))
- | |__________________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 133 ~ return g.bind(v1, v2, a).context(format!(
- 134 + "Failed to BIND({}, {}, {})",
- 135 + &args[0], &args[1], &args[2]
- 136 + ))
- |
- error: missing `return` statement
- --> src/script.rs:140:17
- |
- 140 | / g.put(v, Self::parse_data(&args[1])?)
- 141 | | .context(format!("Failed to PUT({})", &args[0]))
- | |____________________________________________________________________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 140 ~ return g.put(v, Self::parse_data(&args[1])?)
- 141 + .context(format!("Failed to PUT({})", &args[0]))
- |
- error: missing `return` statement
- --> src/script.rs:143:21
- |
- 143 | _cmd => Err(anyhow!("Unknown command: {_cmd}")),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Err(anyhow!("Unknown command: {_cmd}"))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used `unwrap()` on a `Result` value
- --> src/script.rs:115:38
- |
- 115 | static ref LINE: Regex = Regex::new("^([A-Z]+) *\\(([^)]*)\\)$").unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: indexing may panic
- --> src/script.rs:118:33
- |
- 118 | let args: Vec<String> = cap[2]
- | ^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: redundant closure
- --> src/script.rs:120:18
- |
- 120 | .map(|t| t.trim())
- | ^^^^^^^^^^^^ help: replace the closure with the method itself: `str::trim`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
- error: missing `return` statement
- --> src/script.rs:120:22
- |
- 120 | .map(|t| t.trim())
- | ^^^^^^^^ help: add `return` as shown: `return t.trim()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/script.rs:121:25
- |
- 121 | .filter(|t| !t.is_empty())
- | ^^^^^^^^^^^^^ help: add `return` as shown: `return !t.is_empty()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: redundant closure
- --> src/script.rs:122:18
- |
- 122 | .map(|t| t.to_string())
- | ^^^^^^^^^^^^^^^^^ help: replace the closure with the method itself: `std::string::ToString::to_string`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
- error: missing `return` statement
- --> src/script.rs:122:22
- |
- 122 | .map(|t| t.to_string())
- | ^^^^^^^^^^^^^ help: add `return` as shown: `return t.to_string()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `to_string()` called on a `&str`
- --> src/script.rs:122:22
- |
- 122 | .map(|t| t.to_string())
- | ^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: indexing may panic
- --> src/script.rs:124:16
- |
- 124 | match &cap[1] {
- | ^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:126:37
- |
- 126 | let v = self.parse(&args[0], g)?;
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:127:64
- |
- 127 | g.add(v).context(format!("Failed to ADD({})", &args[0]))
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:130:38
- |
- 130 | let v1 = self.parse(&args[0], g)?;
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:131:38
- |
- 131 | let v2 = self.parse(&args[1], g)?;
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:132:26
- |
- 132 | let a = &args[2];
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:135:22
- |
- 135 | &args[0], &args[1], &args[2]
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:135:32
- |
- 135 | &args[0], &args[1], &args[2]
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:135:42
- |
- 135 | &args[0], &args[1], &args[2]
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:139:37
- |
- 139 | let v = self.parse(&args[0], g)?;
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:140:44
- |
- 140 | g.put(v, Self::parse_data(&args[1])?)
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: indexing may panic
- --> src/script.rs:141:60
- |
- 141 | .context(format!("Failed to PUT({})", &args[0]))
- | ^^^^^^^
- |
- = help: consider using `.get(n)` or `.get_mut(n)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: used binding `_cmd` which is prefixed with an underscore. A leading underscore signals that a binding will not be used
- --> src/script.rs:143:52
- |
- 143 | _cmd => Err(anyhow!("Unknown command: {_cmd}")),
- | ^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_binding
- = note: `#[deny(clippy::used_underscore_binding)]` implied by `#[deny(warnings)]`
- error: missing `return` statement
- --> src/script.rs:159:13
- |
- 159 | Ok(Hex::from_vec(bytes))
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(Hex::from_vec(bytes))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/script.rs:161:13
- |
- 161 | Err(anyhow!("Can't parse data '{s}'"))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Err(anyhow!("Can't parse data '{s}'"))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used `unwrap()` on a `Result` value
- --> src/script.rs:150:44
- |
- 150 | static ref DATA_STRIP: Regex = Regex::new("[ \t\n\r\\-]").unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: used `unwrap()` on a `Result` value
- --> src/script.rs:151:38
- |
- 151 | static ref DATA: Regex = Regex::new("^[0-9A-Fa-f]{2}([0-9A-Fa-f]{2})*$").unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: missing `return` statement
- --> src/script.rs:157:26
- |
- 157 | .map(|i| u8::from_str_radix(&d[i..i + 2], 16).unwrap())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return u8::from_str_radix(&d[i..i + 2], 16).unwrap()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used `unwrap()` on a `Result` value
- --> src/script.rs:157:26
- |
- 157 | .map(|i| u8::from_str_radix(&d[i..i + 2], 16).unwrap())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: indexing into a string may panic if the index is within a UTF-8 character
- --> src/script.rs:157:46
- |
- 157 | .map(|i| u8::from_str_radix(&d[i..i + 2], 16).unwrap())
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_slice
- = note: `#[deny(clippy::string_slice)]` implied by `#[deny(warnings)]`
- error: slicing may panic
- --> src/script.rs:157:46
- |
- 157 | .map(|i| u8::from_str_radix(&d[i..i + 2], 16).unwrap())
- | ^^^^^^^^^^^
- |
- = help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#indexing_slicing
- error: arithmetic operation that can potentially result in unexpected side-effects
- --> src/script.rs:157:51
- |
- 157 | .map(|i| u8::from_str_radix(&d[i..i + 2], 16).unwrap())
- | ^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arithmetic_side_effects
- error: integer arithmetic detected
- --> src/script.rs:157:51
- |
- 157 | .map(|i| u8::from_str_radix(&d[i..i + 2], 16).unwrap())
- | ^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
- error: missing `return` statement
- --> src/script.rs:171:17
- |
- 171 | Ok(*self.vars.entry(tail).or_insert_with(|| g.next_id()))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(*self.vars.entry(tail).or_insert_with(|| g.next_id()))`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/script.rs:173:17
- |
- 173 | Ok(u32::from_str(tail.as_str()).context(format!("Parsing of '{s}' failed"))?)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(u32::from_str(tail.as_str()).context(format!("Parsing of '{s}' failed"))?)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/script.rs:177:13
- |
- 177 | Ok(v)
- | ^^^^^ help: add `return` as shown: `return Ok(v)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: `to_string()` called on a `&str`
- --> src/script.rs:167:45
- |
- 167 | let head = s.chars().next().context("Empty identifier".to_string())?;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: literal non-ASCII character detected
- --> src/script.rs:168:35
- |
- 168 | if head == '$' || head == 'ν' {
- | ^^^ help: consider replacing the string with: `'\u{3bd}'`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_ascii_literal
- error: missing `return` statement
- --> src/script.rs:171:61
- |
- 171 | Ok(*self.vars.entry(tail).or_insert_with(|| g.next_id()))
- | ^^^^^^^^^^^ help: add `return` as shown: `return g.next_id()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing documentation for a module
- --> src/lib.rs:64:1
- |
- 64 | mod serialization;
- | ^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: docs for function returning `Result` missing `# Errors` section
- --> src/serialization.rs:34:5
- |
- 34 | pub fn save(&mut self, path: &Path) -> Result<usize> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/serialization.rs:34:5
- |
- 34 | / pub fn save(&mut self, path: &Path) -> Result<usize> {
- 35 | | let start = Instant::now();
- 36 | | let bytes: Vec<u8> = serialize(self).context("Failed to serialize")?;
- 37 | | let size = bytes.len();
- ... |
- 45 | | Ok(size)
- 46 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/serialization.rs:45:9
- |
- 45 | Ok(size)
- | ^^^^^^^^ help: add `return` as shown: `return Ok(size)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: docs for function returning `Result` missing `# Errors` section
- --> src/serialization.rs:50:5
- |
- 50 | pub fn load(path: &Path) -> Result<Sodg> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/serialization.rs:50:5
- |
- 50 | / pub fn load(path: &Path) -> Result<Sodg> {
- 51 | | let start = Instant::now();
- 52 | | let bytes = fs::read(path).context(format!("Can't read from {}", path.display()))?;
- 53 | | let size = bytes.len();
- ... |
- 62 | | Ok(sodg)
- 63 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/serialization.rs:62:9
- |
- 62 | Ok(sodg)
- | ^^^^^^^^ help: add `return` as shown: `return Ok(sodg)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/serialization.rs:50:40
- |
- 50 | pub fn load(path: &Path) -> Result<Sodg> {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing documentation for a module
- --> src/lib.rs:65:1
- |
- 65 | mod slice;
- | ^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: docs for function returning `Result` missing `# Errors` section
- --> src/slice.rs:29:5
- |
- 29 | pub fn slice(&mut self, loc: &str) -> Result<Sodg> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/slice.rs:29:5
- |
- 29 | / pub fn slice(&mut self, loc: &str) -> Result<Sodg> {
- 30 | | self.slice_some(loc, |_v, _to, _a| true)
- 31 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: missing `return` statement
- --> src/slice.rs:30:9
- |
- 30 | self.slice_some(loc, |_v, _to, _a| true)
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return self.slice_some(loc, |_v, _to, _a| true)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: unnecessary structure name repetition
- --> src/slice.rs:29:50
- |
- 29 | pub fn slice(&mut self, loc: &str) -> Result<Sodg> {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing `return` statement
- --> src/slice.rs:30:44
- |
- 30 | self.slice_some(loc, |_v, _to, _a| true)
- | ^^^^ help: add `return` as shown: `return true`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: docs for function which may panic missing `# Panics` section
- --> src/slice.rs:37:5
- |
- 37 | pub fn slice_some(&mut self, loc: &str, p: fn(u32, u32, String) -> bool) -> Result<Sodg> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- note: first possible panic found here
- --> src/slice.rs:48:27
- |
- 48 | let vtx = self.vertices.get(&v).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
- error: docs for function returning `Result` missing `# Errors` section
- --> src/slice.rs:37:5
- |
- 37 | pub fn slice_some(&mut self, loc: &str, p: fn(u32, u32, String) -> bool) -> Result<Sodg> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/slice.rs:37:5
- |
- 37 | / pub fn slice_some(&mut self, loc: &str, p: fn(u32, u32, String) -> bool) -> Result<Sodg> {
- 38 | | let mut todo = HashSet::new();
- 39 | | let mut done = HashSet::new();
- 40 | | todo.insert(self.find(0, loc, &DeadRelay::default())?);
- ... |
- 72 | | })
- 73 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: used unwrap or expect in a function that returns result or option
- --> src/slice.rs:37:5
- |
- 37 | / pub fn slice_some(&mut self, loc: &str, p: fn(u32, u32, String) -> bool) -> Result<Sodg> {
- 38 | | let mut todo = HashSet::new();
- 39 | | let mut done = HashSet::new();
- 40 | | todo.insert(self.find(0, loc, &DeadRelay::default())?);
- ... |
- 72 | | })
- 73 | | }
- | |_____^
- |
- = help: unwrap and expect should not be used in a function that returns result or option
- note: potential non-recoverable error(s)
- --> src/slice.rs:48:27
- |
- 48 | let vtx = self.vertices.get(&v).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
- error: missing `return` statement
- --> src/slice.rs:65:9
- |
- 65 | / Ok(Sodg {
- 66 | | vertices: new_vertices,
- 67 | | next_v: self.next_v,
- 68 | | alerts: self.alerts.clone(),
- ... |
- 71 | | finds: HashSet::new(),
- 72 | | })
- | |__________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 65 ~ return Ok(Sodg {
- 66 + vertices: new_vertices,
- 67 + next_v: self.next_v,
- 68 + alerts: self.alerts.clone(),
- 69 + alerts_active: self.alerts_active,
- 70 + #[cfg(feature = "sober")]
- 71 + finds: HashSet::new(),
- 72 + })
- |
- error: unnecessary structure name repetition
- --> src/slice.rs:37:88
- |
- 37 | pub fn slice_some(&mut self, loc: &str, p: fn(u32, u32, String) -> bool) -> Result<Sodg> {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
- --> src/slice.rs:48:27
- |
- 48 | let vtx = self.vertices.get(&v).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&self.vertices[&v]`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap
- error: used `unwrap()` on an `Option` value
- --> src/slice.rs:48:27
- |
- 48 | let vtx = self.vertices.get(&v).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is `None`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: it is more concise to loop over references to containers instead of using explicit iteration methods
- --> src/slice.rs:49:26
- |
- 49 | for e in vtx.edges.iter() {
- | ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&vtx.edges`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
- error: missing `return` statement
- --> src/slice.rs:62:62
- |
- 62 | for (v, vtx) in self.vertices.iter().filter(|(v, _)| done.contains(v)) {
- | ^^^^^^^^^^^^^^^^ help: add `return` as shown: `return done.contains(v)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: type of pattern does not match the expression type
- --> src/slice.rs:62:54
- |
- 62 | for (v, vtx) in self.vertices.iter().filter(|(v, _)| done.contains(v)) {
- | ^^^^^^
- |
- = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
- error: unnecessary structure name repetition
- --> src/slice.rs:65:12
- |
- 65 | Ok(Sodg {
- | ^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing documentation for a module
- --> src/lib.rs:66:1
- |
- 66 | mod vertex;
- | ^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: pub(crate) struct inside private module
- --> src/vertex.rs:26:1
- |
- 26 | pub(crate) struct Vertex {
- | ----------^^^^^^^^^^^^^^
- | |
- | help: consider using: `pub`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
- error: missing `return` statement
- --> src/vertex.rs:48:9
- |
- 48 | / Vertex {
- 49 | | edges: vec![],
- 50 | | data: Hex::empty(),
- 51 | | parents: HashSet::new(),
- 52 | | taken: false,
- 53 | | }
- | |_________^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- help: add `return` as shown
- |
- 48 ~ return Vertex {
- 49 + edges: vec![],
- 50 + data: Hex::empty(),
- 51 + parents: HashSet::new(),
- 52 + taken: false,
- 53 + }
- |
- error: unnecessary structure name repetition
- --> src/vertex.rs:48:9
- |
- 48 | Vertex {
- | ^^^^^^ help: use the applicable keyword: `Self`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#use_self
- error: missing documentation for a module
- --> src/lib.rs:67:1
- |
- 67 | mod xml;
- | ^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: docs for function which may panic missing `# Panics` section
- --> src/xml.rs:57:5
- |
- 57 | pub fn to_xml(&self) -> Result<String> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- note: first possible panic found here
- --> src/xml.rs:74:17
- |
- 74 | v_node.add_child(e_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
- error: docs for function returning `Result` missing `# Errors` section
- --> src/xml.rs:57:5
- |
- 57 | pub fn to_xml(&self) -> Result<String> {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: missing `#[inline]` for a method
- --> src/xml.rs:57:5
- |
- 57 | / pub fn to_xml(&self) -> Result<String> {
- 58 | | let mut xml = XMLBuilder::new()
- 59 | | .version(XMLVersion::XML1_1)
- 60 | | .encoding("UTF-8".into())
- ... |
- 88 | | Ok(std::str::from_utf8(&writer)?.to_string())
- 89 | | }
- | |_____^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_inline_in_public_items
- error: used unwrap or expect in a function that returns result or option
- --> src/xml.rs:57:5
- |
- 57 | / pub fn to_xml(&self) -> Result<String> {
- 58 | | let mut xml = XMLBuilder::new()
- 59 | | .version(XMLVersion::XML1_1)
- 60 | | .encoding("UTF-8".into())
- ... |
- 88 | | Ok(std::str::from_utf8(&writer)?.to_string())
- 89 | | }
- | |_____^
- |
- = help: unwrap and expect should not be used in a function that returns result or option
- note: potential non-recoverable error(s)
- --> src/xml.rs:74:17
- |
- 74 | v_node.add_child(e_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ...
- 78 | / data_node
- 79 | | .add_text(vtx.data.print().replace('-', " "))
- 80 | | .unwrap();
- | |_____________________________^
- 81 | v_node.add_child(data_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 82 | }
- 83 | root.add_child(v_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ...
- 87 | xml.generate(&mut writer).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_in_result
- error: missing `return` statement
- --> src/xml.rs:88:9
- |
- 88 | Ok(std::str::from_utf8(&writer)?.to_string())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `return` as shown: `return Ok(std::str::from_utf8(&writer)?.to_string())`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: missing `return` statement
- --> src/xml.rs:66:37
- |
- 66 | .sorted_by_key(|(v, _)| <&u32>::clone(v))
- | ^^^^^^^^^^^^^^^^ help: add `return` as shown: `return <&u32>::clone(v)`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: type of pattern does not match the expression type
- --> src/xml.rs:66:29
- |
- 66 | .sorted_by_key(|(v, _)| <&u32>::clone(v))
- | ^^^^^^
- |
- = help: explicitly match against a `&_` pattern and adjust the enclosed variable bindings
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#pattern_type_mismatch
- error: missing `return` statement
- --> src/xml.rs:70:57
- |
- 70 | for e in vtx.edges.iter().sorted_by_key(|e| e.a.clone()) {
- | ^^^^^^^^^^^ help: add `return` as shown: `return e.a.clone()`
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_return
- error: used `unwrap()` on a `Result` value
- --> src/xml.rs:74:17
- |
- 74 | v_node.add_child(e_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: used `unwrap()` on a `Result` value
- --> src/xml.rs:78:17
- |
- 78 | / data_node
- 79 | | .add_text(vtx.data.print().replace('-', " "))
- 80 | | .unwrap();
- | |_____________________________^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: used `unwrap()` on a `Result` value
- --> src/xml.rs:81:17
- |
- 81 | v_node.add_child(data_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: used `unwrap()` on a `Result` value
- --> src/xml.rs:83:13
- |
- 83 | root.add_child(v_node).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: used `unwrap()` on a `Result` value
- --> src/xml.rs:87:9
- |
- 87 | xml.generate(&mut writer).unwrap();
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: if this value is an `Err`, it will panic
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
- error: `to_string()` called on a `&str`
- --> src/xml.rs:88:12
- |
- 88 | Ok(std::str::from_utf8(&writer)?.to_string())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: consider using `.to_owned()`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string
- error: used import from `std` instead of `core`
- --> src/xml.rs:88:12
- |
- 88 | Ok(std::str::from_utf8(&writer)?.to_string())
- | ^^^^^^^^^^^^^^^^^^^
- |
- = help: consider importing the item from `core`
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
- error: item in documentation is missing backticks
- --> src/lib.rs:82:47
- |
- 82 | /// A struct that represents a Surging Object DiGraph (SODG).
- | ^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
- help: try
- |
- 82 | /// A struct that represents a Surging Object `DiGraph` (SODG).
- | ~~~~~~~~~
- error: docs for function returning `Result` missing `# Errors` section
- --> src/lib.rs:141:5
- |
- 141 | fn re(&self, v: u32, a: &str) -> Result<String>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
- error: exported structs should not be exhaustive
- --> src/lib.rs:147:1
- |
- 147 | pub struct DeadRelay {}
- | ^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#exhaustive_structs
- = note: `#[deny(clippy::exhaustive_structs)]` implied by `#[deny(warnings)]`
- help: try adding #[non_exhaustive]
- |
- 147 | #[non_exhaustive]
- |
- error: missing documentation for a struct field
- --> src/lib.rs:158:5
- |
- 158 | lambda: fn(u32, &str) -> Result<String>,
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: missing documentation for a struct field
- --> src/lib.rs:163:5
- |
- 163 | s: String,
- | ^^^^^^^^^
- |
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_docs_in_private_items
- error: `clippy::restriction` is not meant to be enabled as a group
- --> src/lib.rs:43:1
- |
- 43 | clippy::restriction,
- | ^^^^^^^^^^^^^^^^^^^
- |
- = help: enable the restriction lints you need individually
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blanket_clippy_restriction_lints
- = note: `#[deny(clippy::blanket_clippy_restriction_lints)]` implied by `#[deny(warnings)]`
- error: multiple implementations of this structure
- --> src/ctors.rs:28:1
- |
- 28 | / impl Sodg {
- 29 | | /// Make an empty [`Sodg`], with no vertices and no edges.
- 30 | | pub fn empty() -> Self {
- 31 | | let mut g = Sodg {
- ... |
- 129 | | }
- 130 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- = note: `#[deny(clippy::multiple_inherent_impl)]` implied by `#[deny(warnings)]`
- error: multiple implementations of this structure
- --> src/debug.rs:50:1
- |
- 50 | / impl Sodg {
- 51 | | /// Print a single vertex to a string, which can be used for
- 52 | | /// logging and debugging.
- 53 | | pub fn v_print(&self, v: u32) -> String {
- ... |
- 65 | | }
- 66 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/dot.rs:24:1
- |
- 24 | / impl Sodg {
- 25 | | /// Print SODG as a DOT graph.
- 26 | | ///
- 27 | | /// For example, for this code:
- ... |
- 99 | | }
- 100 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/find.rs:85:1
- |
- 85 | / impl Sodg {
- 86 | | /// Find a vertex in the Sodg by its locator using a [`Relay`]
- 87 | | /// to provide alternative edge names, if the desired ones are not found.
- 88 | | ///
- ... |
- 218 | | }
- 219 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/gc.rs:12:1
- |
- 12 | / impl Sodg {
- 13 | | /// Attempt to collect the vertex (delete it from the graph).
- 14 | | ///
- 15 | | /// If there are no edges leading to it, then it is deleted and
- ... |
- 59 | | }
- 60 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/inspect.rs:27:1
- |
- 27 | / impl Sodg {
- 28 | | /// Find an object by the provided locator and print its tree
- 29 | | /// of sub-objects and edges.
- 30 | | ///
- ... |
- 76 | | }
- 77 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/merge.rs:26:1
- |
- 26 | / impl Sodg {
- 27 | | /// Merge another graph into the current one.
- 28 | | ///
- 29 | | /// It is expected that both graphs are trees. The `left` vertex is expected
- ... |
- 80 | | }
- 81 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/misc.rs:23:1
- |
- 23 | / impl Sodg {
- 24 | | /// Get total number of vertices in the graph.
- 25 | | pub fn len(&self) -> usize {
- 26 | | self.vertices.len()
- ... |
- 44 | | }
- 45 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/next.rs:23:1
- |
- 23 | / impl Sodg {
- 24 | | /// Get next unique ID of a vertex.
- 25 | | ///
- 26 | | /// This ID will never be returned by `next()` again. Also, this ID will not
- ... |
- 37 | | }
- 38 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/ops.rs:29:1
- |
- 29 | / impl Sodg {
- 30 | | /// Add a new vertex `v1` to itself.
- 31 | | ///
- 32 | | /// For example:
- ... |
- 230 | | }
- 231 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/serialization.rs:29:1
- |
- 29 | / impl Sodg {
- 30 | | /// Save the entire [`Sodg`] into a binary file.
- 31 | | ///
- 32 | | /// The entire [`Sodg`] can be restored from the file.
- ... |
- 63 | | }
- 64 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/slice.rs:26:1
- |
- 26 | / impl Sodg {
- 27 | | /// Take a slice of the graph, keeping only the vertex specified
- 28 | | /// by the locator and its kids, recursively found in the entire graph.
- 29 | | pub fn slice(&mut self, loc: &str) -> Result<Sodg> {
- ... |
- 73 | | }
- 74 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: multiple implementations of this structure
- --> src/xml.rs:26:1
- |
- 26 | / impl Sodg {
- 27 | | /// Make XML graph.
- 28 | | ///
- 29 | | /// For example, for this code:
- ... |
- 89 | | }
- 90 | | }
- | |_^
- |
- note: first implementation here
- --> src/alerts.rs:31:1
- |
- 31 | / impl Sodg {
- 32 | | /// Attach a new alert to this graph.
- 33 | | ///
- 34 | | /// For example, you don't want
- ... |
- 87 | | }
- 88 | | }
- | |_^
- = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_inherent_impl
- error: could not compile `sodg` due to 499 previous errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement