Remove wrong must_use

This commit is contained in:
Adrian Heine 2025-12-09 21:59:48 +01:00
parent b11742ffad
commit 36b85ff350

View file

@ -92,12 +92,10 @@ pub trait SocketSpec {
} }
impl<T: AsRef<Path>> SocketSpec for T { impl<T: AsRef<Path>> SocketSpec for T {
#[must_use]
fn to_proxy_pass(&self) -> String { fn to_proxy_pass(&self) -> String {
format!("unix:{}:", self.as_ref().to_str().unwrap()) format!("unix:{}:", self.as_ref().to_str().unwrap())
} }
#[must_use]
fn to_uwsgi_pass(&self) -> String { fn to_uwsgi_pass(&self) -> String {
format!("unix:{}", self.as_ref().to_str().unwrap()) format!("unix:{}", self.as_ref().to_str().unwrap())
} }
@ -107,19 +105,16 @@ impl<T: AsRef<Path>> SocketSpec for T {
pub struct LocalTcpSocket(NonZeroUsize); pub struct LocalTcpSocket(NonZeroUsize);
impl LocalTcpSocket { impl LocalTcpSocket {
#[must_use]
pub const fn new(x: NonZeroUsize) -> Self { pub const fn new(x: NonZeroUsize) -> Self {
Self(x) Self(x)
} }
} }
impl SocketSpec for LocalTcpSocket { impl SocketSpec for LocalTcpSocket {
#[must_use]
fn to_proxy_pass(&self) -> String { fn to_proxy_pass(&self) -> String {
format!("localhost:{}", self.0) format!("localhost:{}", self.0)
} }
#[must_use]
fn to_uwsgi_pass(&self) -> String { fn to_uwsgi_pass(&self) -> String {
format!("localhost:{}", self.0) format!("localhost:{}", self.0)
} }