Skip to content

Commit 971e111

Browse files
committed
Remove unnecessary attributes
1 parent 15444ae commit 971e111

29 files changed

+1
-52
lines changed

.clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
msrv = "1.67"
1+
msrv = "1.67.1"
22

33
missing-docs-in-crate-items = true
44
disallowed-macros = [

time-macros/src/date.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ pub(crate) fn parse(chars: &mut Peekable<token_stream::IntoIter>) -> Result<Date
8181
consume_number::<u16>("month or ordinal", chars)?;
8282

8383
// year-month-day
84-
#[allow(clippy::branches_sharing_code)] // clarity
8584
if consume_punct('-', chars).is_ok() {
8685
let (month_span, month) = (month_or_ordinal_span, month_or_ordinal);
8786
let (day_span, day) = consume_number::<u8>("day", chars)?;

time-macros/src/format_description/lexer.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ pub(super) enum BracketKind {
102102
}
103103

104104
pub(super) enum ComponentKind {
105-
#[allow(clippy::missing_docs_in_private_items)]
106105
Whitespace,
107-
#[allow(clippy::missing_docs_in_private_items)]
108106
NotWhitespace,
109107
}
110108

@@ -124,7 +122,6 @@ fn attach_location<'item>(
124122
})
125123
}
126124

127-
#[allow(clippy::unused_peekable)] // false positive
128125
pub(super) fn lex<const VERSION: u8>(
129126
mut input: &[u8],
130127
proc_span: proc_macro::Span,

time-macros/src/format_description/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ impl Location {
6767

6868
#[derive(Clone, Copy)]
6969
struct Span {
70-
#[allow(clippy::missing_docs_in_private_items)]
7170
start: Location,
72-
#[allow(clippy::missing_docs_in_private_items)]
7371
end: Location,
7472
}
7573

@@ -163,7 +161,6 @@ impl From<Error> for crate::Error {
163161

164162
struct Unused<T>(core::marker::PhantomData<T>);
165163

166-
#[allow(clippy::missing_const_for_fn)] // false positive
167164
fn unused<T>(_: T) -> Unused<T> {
168165
Unused(core::marker::PhantomData)
169166
}

time-macros/src/format_description/public/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use proc_macro::{Literal, TokenStream};
66
pub(crate) use self::component::Component;
77
use crate::to_tokens::ToTokenStream;
88

9-
#[allow(variant_size_differences)]
109
pub(crate) enum OwnedFormatItem {
1110
Literal(Box<[u8]>),
1211
Component(Component),

time/src/duration.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ pub struct Duration {
4444
/// Number of nanoseconds within the second. The sign always matches the `seconds` field.
4545
// Sign must match that of `seconds` (though this is not a safety requirement).
4646
nanoseconds: Nanoseconds,
47-
#[allow(clippy::missing_docs_in_private_items)]
4847
padding: Padding,
4948
}
5049

time/src/error/component_range.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,4 @@ impl ComponentRange {
8989
}
9090

9191
#[cfg(feature = "std")]
92-
#[allow(clippy::std_instead_of_core)]
9392
impl std::error::Error for ComponentRange {}

time/src/error/conversion_range.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ impl fmt::Display for ConversionRange {
1616
}
1717

1818
#[cfg(feature = "std")]
19-
#[allow(clippy::std_instead_of_core)]
2019
impl std::error::Error for ConversionRange {}
2120

2221
impl From<ConversionRange> for crate::Error {

time/src/error/different_variant.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ impl fmt::Display for DifferentVariant {
1414
}
1515

1616
#[cfg(feature = "std")]
17-
#[allow(clippy::std_instead_of_core)]
1817
impl std::error::Error for DifferentVariant {}
1918

2019
impl From<DifferentVariant> for crate::Error {

time/src/error/format.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use crate::error;
77

88
/// An error occurred when formatting.
99
#[non_exhaustive]
10-
#[allow(missing_copy_implementations)]
1110
#[derive(Debug)]
1211
pub enum Format {
1312
/// The type being formatted does not contain sufficient information to format a component.
@@ -55,7 +54,6 @@ impl TryFrom<Format> for io::Error {
5554
}
5655

5756
#[cfg(feature = "std")]
58-
#[allow(clippy::std_instead_of_core)]
5957
impl std::error::Error for Format {
6058
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
6159
match *self {

0 commit comments

Comments
 (0)