This repository was archived by the owner on Dec 6, 2024. It is now read-only.
Commit b6ded1d
committed
Pass base_url by reference to namerd::resolve (#37)
Clippy notes that namerd::resolve does not need to take ownership of `base_url`:
$ cargo clippy
...
warning: this argument is passed by value, but not consumed in the function body
--> src/namerd.rs:45:29
|
45 | pub fn resolve<C>(base_url: String,
| ^^^^^^
|
= note: #[warn(needless_pass_by_value)] on by default
help: consider changing the type to `&str`
| pub fn resolve<C>(base_url: &str,
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#needless_pass_by_valu
This doesn't have any serious impact, but it is noisy when linting.
To fix this, we pass a `&str` instead of a `String`.1 parent d61091f commit b6ded1d
2 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
0 commit comments