-
Notifications
You must be signed in to change notification settings - Fork 144
RUST-1440 bump bson clippy version to 1.63.0 #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
looks like there are still some clippy errors in CI. I think you've gotta run |
Fixed the |
@@ -168,7 +169,7 @@ impl crate::DateTime { | |||
/// | |||
/// let big = bson::DateTime::from_millis(i64::MAX); | |||
/// let chrono_big = big.to_chrono(); | |||
/// assert_eq!(chrono_big, chrono::MAX_DATETIME) | |||
/// assert_eq!(chrono_big, chrono::DateTime::<chrono::Utc>::MAX_UTC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did chrono drop MAX_DATETIME
? Or was this something clippy was complaining about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chrono deprecated MAX_DATETIME
, yeah.
src/raw/document_buf.rs
Outdated
@@ -386,7 +386,7 @@ impl Deref for RawDocumentBuf { | |||
|
|||
impl Borrow<RawDocument> for RawDocumentBuf { | |||
fn borrow(&self) -> &RawDocument { | |||
&*self | |||
&**self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the extra deref needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error clippy made for this:
error: deref on an immutable reference
--> src/raw/document_buf.rs:389:9
|
389 | &*self
| ^^^^^^
|
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
help: if you would like to reborrow, try removing `&*`
|
389 | self
|
help: if you would like to deref, try using `&**`
|
389 | &**self
|
I've updated it to call .deref()
directly for clarity.
No description provided.