Skip to content

Commit 2a9812f

Browse files
committed
refactor(lint): prepare breaking changes
1 parent 16421db commit 2a9812f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
avoid-breaking-exported-api = false

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ impl<T> SharedType<T> {
116116
pub struct OptRc<T>(Option<Rc<T>>);
117117

118118
impl<T> OptRc<T> {
119+
#[allow(clippy::ref_option)] // TODO: breaking change
119120
pub fn new(orc: &Option<Rc<T>>) -> Self {
120121
match orc {
121122
Some(rc) => Self::from(rc.clone()),
@@ -127,6 +128,7 @@ impl<T> OptRc<T> {
127128
self.0.as_ref().unwrap().clone()
128129
}
129130

131+
#[allow(clippy::ref_option)] // TODO: breaking change
130132
pub fn get_value(&self) -> &Option<Rc<T>> {
131133
&self.0
132134
}
@@ -677,6 +679,7 @@ pub fn process_zlib(bytes: &[u8]) -> Result<Vec<u8>, String> {
677679
Ok(dec_bytes)
678680
}
679681

682+
#[allow(clippy::unnecessary_wraps)] // TODO: breaking change
680683
pub fn reverse_string<S: AsRef<str>>(str: S) -> KResult<String> {
681684
Ok(str.as_ref().graphemes(true).rev().collect())
682685
}

0 commit comments

Comments
 (0)