Skip to content

Commit 0e6009a

Browse files
committed
chore: address compiler warnings
- mismatched_lifetime_syntaxes - clippy::uninlined_format_args
1 parent fe1929b commit 0e6009a

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

nginx-sys/build/main.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -341,22 +341,19 @@ pub fn print_cargo_metadata<T: AsRef<Path>>(includes: &[T]) -> Result<(), Box<dy
341341

342342
// A quoted list of all recognized features to be passed to rustc-check-cfg.
343343
let values = NGX_CONF_FEATURES.join("\",\"");
344-
println!("cargo::metadata=features_check=\"{}\"", values);
345-
println!(
346-
"cargo::rustc-check-cfg=cfg(ngx_feature, values(\"{}\"))",
347-
values
348-
);
344+
println!("cargo::metadata=features_check=\"{values}\"");
345+
println!("cargo::rustc-check-cfg=cfg(ngx_feature, values(\"{values}\"))");
349346

350347
// A list of features enabled in the nginx build we're using
351348
println!("cargo::metadata=features={}", ngx_features.join(","));
352349
for feature in ngx_features {
353-
println!("cargo::rustc-cfg=ngx_feature=\"{}\"", feature);
350+
println!("cargo::rustc-cfg=ngx_feature=\"{feature}\"");
354351
}
355352

356353
// A quoted list of all recognized operating systems to be passed to rustc-check-cfg.
357354
let values = NGX_CONF_OS.join("\",\"");
358-
println!("cargo::metadata=os_check=\"{}\"", values);
359-
println!("cargo::rustc-check-cfg=cfg(ngx_os, values(\"{}\"))", values);
355+
println!("cargo::metadata=os_check=\"{values}\"");
356+
println!("cargo::rustc-check-cfg=cfg(ngx_os, values(\"{values}\"))");
360357
// Current detected operating system
361358
println!("cargo::metadata=os={ngx_os}");
362359
println!("cargo::rustc-cfg=ngx_os=\"{ngx_os}\"");

src/core/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl NgxStr {
7373
///
7474
/// See [`String::from_utf8_lossy`].
7575
#[cfg(feature = "alloc")]
76-
pub fn to_string_lossy(&self) -> Cow<str> {
76+
pub fn to_string_lossy(&self) -> Cow<'_, str> {
7777
String::from_utf8_lossy(self.as_bytes())
7878
}
7979

src/http/request.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,13 +375,13 @@ impl Request {
375375

376376
/// Iterate over headers_in
377377
/// each header item is (&str, &str) (borrowed)
378-
pub fn headers_in_iterator(&self) -> NgxListIterator {
378+
pub fn headers_in_iterator(&self) -> NgxListIterator<'_> {
379379
unsafe { list_iterator(&self.0.headers_in.headers) }
380380
}
381381

382382
/// Iterate over headers_out
383383
/// each header item is (&str, &str) (borrowed)
384-
pub fn headers_out_iterator(&self) -> NgxListIterator {
384+
pub fn headers_out_iterator(&self) -> NgxListIterator<'_> {
385385
unsafe { list_iterator(&self.0.headers_out.headers) }
386386
}
387387
}
@@ -448,7 +448,7 @@ impl<'a> From<&'a ngx_list_part_t> for ListPart<'a> {
448448
/// # Safety
449449
///
450450
/// The caller has provided a valid [`ngx_str_t`] which can be dereferenced validly.
451-
pub unsafe fn list_iterator(list: &ngx_list_t) -> NgxListIterator {
451+
pub unsafe fn list_iterator(list: &ngx_list_t) -> NgxListIterator<'_> {
452452
NgxListIterator {
453453
part: Some((&list.part).into()),
454454
i: 0,

0 commit comments

Comments
 (0)