Skip to content

Commit a1fe01e

Browse files
authored
fix: new lints coming with 1.78 and 1.80-nightly (#275)
* fix(doc): rename doc_cfg guard to docsrs, rust-lang/cargo#13875 * fix(node-wasm): remove unused method in JsContext trait
1 parent fa3c164 commit a1fe01e

File tree

7 files changed

+10
-26
lines changed

7 files changed

+10
-26
lines changed

node-wasm/src/utils.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ pub(crate) trait JsContext<T> {
7474
fn js_context<C>(self, context: C) -> Result<T, JsError>
7575
where
7676
C: fmt::Display + Send + Sync + 'static;
77-
78-
fn with_js_context<F, C>(self, context_fn: F) -> Result<T, JsError>
79-
where
80-
C: fmt::Display + Send + Sync + 'static,
81-
F: FnOnce() -> C;
8277
}
8378

8479
impl<T, E> JsContext<T> for std::result::Result<T, E>
@@ -91,15 +86,4 @@ where
9186
{
9287
self.map_err(|e| JsError::new(&format!("{context}: {e}")))
9388
}
94-
95-
fn with_js_context<F, C>(self, context_fn: F) -> Result<T, JsError>
96-
where
97-
C: fmt::Display + Send + Sync + 'static,
98-
F: FnOnce() -> C,
99-
{
100-
self.map_err(|e| {
101-
let context = context_fn();
102-
JsError::new(&format!("{context}: {e}"))
103-
})
104-
}
10589
}

node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ test-utils = ["celestia-types/test-utils"]
102102

103103
[package.metadata.docs.rs]
104104
features = ["test-utils"]
105-
rustdoc-args = ["--cfg", "docs_rs"]
105+
rustdoc-args = ["--cfg", "docsrs"]

node/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg_attr(docs_rs, feature(doc_cfg))]
1+
#![cfg_attr(docsrs, feature(doc_cfg))]
22
#![doc = include_str!("../README.md")]
33

44
pub mod blockstore;
@@ -11,7 +11,7 @@ pub mod peer_tracker;
1111
pub mod store;
1212
pub mod syncer;
1313
#[cfg(any(test, feature = "test-utils"))]
14-
#[cfg_attr(docs_rs, doc(cfg(feature = "test-utils")))]
14+
#[cfg_attr(docsrs, doc(cfg(feature = "test-utils")))]
1515
pub mod test_utils;
1616
mod utils;
1717

rpc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ wasm-bindgen = ["celestia-types/wasm-bindgen"]
5454

5555
[package.metadata.docs.rs]
5656
features = ["p2p"]
57-
rustdoc-args = ["--cfg", "docs_rs"]
57+
rustdoc-args = ["--cfg", "docsrs"]

rpc/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg_attr(docs_rs, feature(doc_cfg))]
1+
#![cfg_attr(docsrs, feature(doc_cfg))]
22
#![doc = include_str!("../README.md")]
33

44
mod blob;
@@ -16,7 +16,7 @@ pub use crate::client::Client;
1616
pub use crate::error::{Error, Result};
1717
pub use crate::header::HeaderClient;
1818
#[cfg(feature = "p2p")]
19-
#[cfg_attr(docs_rs, doc(cfg(feature = "p2p")))]
19+
#[cfg_attr(docsrs, doc(cfg(feature = "p2p")))]
2020
pub use crate::p2p::P2PClient;
2121
pub use crate::share::ShareClient;
2222
pub use crate::state::StateClient;

types/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ wasm-bindgen = ["celestia-tendermint/wasm-bindgen"]
5858

5959
[package.metadata.docs.rs]
6060
features = ["p2p", "test-utils"]
61-
rustdoc-args = ["--cfg", "docs_rs"]
61+
rustdoc-args = ["--cfg", "docsrs"]
6262

6363
[package.metadata.cargo-udeps.ignore]
6464
development = ["indoc"]

types/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg_attr(docs_rs, feature(doc_cfg))]
1+
#![cfg_attr(docsrs, feature(doc_cfg))]
22
#![doc = include_str!("../README.md")]
33

44
pub mod blob;
@@ -13,7 +13,7 @@ pub mod hash;
1313
pub mod namespaced_data;
1414
pub mod nmt;
1515
#[cfg(feature = "p2p")]
16-
#[cfg_attr(docs_rs, doc(cfg(feature = "p2p")))]
16+
#[cfg_attr(docsrs, doc(cfg(feature = "p2p")))]
1717
pub mod p2p;
1818
pub mod row;
1919
mod rsmt2d;
@@ -22,7 +22,7 @@ mod share;
2222
pub mod state;
2323
mod sync;
2424
#[cfg(any(test, feature = "test-utils"))]
25-
#[cfg_attr(docs_rs, doc(cfg(feature = "test-utils")))]
25+
#[cfg_attr(docsrs, doc(cfg(feature = "test-utils")))]
2626
pub mod test_utils;
2727
pub mod trust_level;
2828
mod validate;

0 commit comments

Comments
 (0)