Skip to content

Commit

Permalink
fix: Clippy 1.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-auer committed Dec 19, 2019
1 parent de12af6 commit f928869
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 4 additions & 0 deletions common/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,14 @@ where

/// Unsafely creates a new `SelfCell` from a derived object by moving the owner.
///
/// # Safety
///
/// This is an inherently unsafe process. The caller must guarantee that the derived object only
/// borrows from the owner that is moved into this container. This is useful, when cloning the
/// owner by deriving a sub-object.
///
/// # Example
///
/// ```rust
/// # use std::sync::Arc;
/// # use symbolic_common::{AsSelf, SelfCell};
Expand Down
11 changes: 6 additions & 5 deletions debuginfo/src/pdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
use std::borrow::Cow;
use std::cell::{RefCell, RefMut};
use std::cmp::Ordering;
use std::collections::btree_map::{BTreeMap, Entry};
use std::fmt;
use std::io::Cursor;
Expand Down Expand Up @@ -392,11 +393,11 @@ where

while let Some(item) = self.iter.next()? {
self.finder.update(&self.iter);
if item.index() == index {
return Ok(item);
} else if item.index() > index {
break;
};
match item.index().partial_cmp(&index) {
Some(Ordering::Equal) => return Ok(item),
Some(Ordering::Greater) => break,
_ => continue,
}
}

Err(pdb::Error::TypeNotFound(index.into()).into())
Expand Down
2 changes: 0 additions & 2 deletions demangle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
//! use symbolic_common::{Language, Name};
//! use symbolic_demangle::Demangle;
//!
//! # fn main() {
//! let name = Name::new("__ZN3std2io4Read11read_to_end17hb85a0f6802e14499E");
//! assert_eq!(name.detect_language(), Language::Rust);
//! assert_eq!(name.try_demangle(Default::default()), "std::io::Read::read_to_end");
//! # }
//! ```
#![warn(missing_docs)]
Expand Down
4 changes: 1 addition & 3 deletions minidump/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,11 @@ pub type ParseCodeModuleIdError = ParseDebugIdError;
/// use symbolic_minidump::processor::CodeModuleId;
/// # use symbolic_minidump::processor::ParseCodeModuleIdError;
///
/// # fn foo() -> Result<(), ParseCodeModuleIdError> {
/// # fn main() -> Result<(), ParseCodeModuleIdError> {
/// let id = CodeModuleId::from_str("DFB8E43AF2423D73A453AEB6A777EF75a")?;
/// assert_eq!("DFB8E43AF2423D73A453AEB6A777EF75a".to_string(), id.to_string());
/// # Ok(())
/// # }
///
/// # fn main() { foo().unwrap() }
/// ```
#[derive(Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
pub struct CodeModuleId {
Expand Down

0 comments on commit f928869

Please sign in to comment.