mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Add missing_const_for_fn clippy lint (#8498)
This commit is contained in:
@ -23,7 +23,7 @@ enum MetricField<'a> {
|
||||
}
|
||||
|
||||
impl<'a> MetricField<'a> {
|
||||
fn field(&self) -> &'a Field {
|
||||
const fn field(&self) -> &'a Field {
|
||||
match self {
|
||||
MetricField::Included(Metric { field, .. }) | MetricField::Skipped(field) => field,
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ pub(crate) struct Metric<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Metric<'a> {
|
||||
pub(crate) fn new(field: &'a Field, description: String, rename: Option<LitStr>) -> Self {
|
||||
pub(crate) const fn new(field: &'a Field, description: String, rename: Option<LitStr>) -> Self {
|
||||
Self { field, description, rename }
|
||||
}
|
||||
|
||||
|
||||
@ -152,7 +152,7 @@ impl<T> MeteredSender<T> {
|
||||
}
|
||||
|
||||
/// Returns the underlying [Sender](mpsc::Sender).
|
||||
pub fn inner(&self) -> &mpsc::Sender<T> {
|
||||
pub const fn inner(&self) -> &mpsc::Sender<T> {
|
||||
&self.sender
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ impl<T: Send + 'static> MeteredPollSender<T> {
|
||||
}
|
||||
|
||||
/// Returns the underlying [PollSender].
|
||||
pub fn inner(&self) -> &PollSender<T> {
|
||||
pub const fn inner(&self) -> &PollSender<T> {
|
||||
&self.sender
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user