style: adjust specified lifetime in code

- include the lifetime instead of hide it
lint message: hiding a lifetime that's elided elsewhere is confusing
help: the same lifetime is referred to in inconsistent ways, making the signature confusing
- remove useless lifetime
lint message: the following explicit lifetimes could be elided: 'a
help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_lifetimes
This commit is contained in:
Gwen Lg
2025-12-13 17:40:06 +01:00
parent 295c850380
commit 209263eb93
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -344,10 +344,10 @@ pub fn get_staged_or_current_role(
None
}
pub fn find_matching_node<'a>(
pub fn find_matching_node(
status: &GetClusterStatusResponse,
layout: &GetClusterLayoutResponse,
pattern: &'a str,
pattern: &str,
) -> Result<String, Error> {
let all_node_ids_iter = status
.nodes
+1 -1
View File
@@ -647,7 +647,7 @@ struct PollRangeResponse {
}
impl<'a> Filter<'a> {
fn query_params(&self) -> Vec<(&'static str, std::borrow::Cow<str>)> {
fn query_params(&self) -> Vec<(&'static str, std::borrow::Cow<'_, str>)> {
let mut res = Vec::<(&'static str, std::borrow::Cow<str>)>::with_capacity(8);
if let Some(start) = self.start.as_deref() {
res.push(("start", start.into()));