Skip to content

Commit

Permalink
fix cargo clippy check
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Sep 6, 2024
1 parent 998d000 commit 65c5663
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,10 @@ pub fn new() -> SdResult<()> {
/// membership and resolved dependencies for the current package, storing this data can result in
/// significantly larger crate sizes. As such, the CARGO_METADATA const is disabled by default.
///
/// Should you choose to retain this information, you have the option to customize a deny_const object
/// and override the `new_deny` method parameters accordingly.
/// Should you choose to retain this information, you have the option to customize a deny_const
/// object and override the `new_deny` method parameters accordingly.
///
#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
pub fn default_deny() -> BTreeSet<ShadowConst> {
BTreeSet::from([CARGO_METADATA])
}
Expand Down Expand Up @@ -266,7 +268,9 @@ pub fn new_deny(deny_const: BTreeSet<ShadowConst>) -> SdResult<()> {
}

/// Identical to [`new`], but additionally accepts an output hook.
/// The hook receives the output file of `shadow-rs`, and it can add additional entries to the output of `shadow-rs` by writing to this file.
///
/// The hook receives the output file of `shadow-rs`, and it can add additional entries to the
/// output of `shadow-rs` by writing to this file.
/// Note that since the output will be compiled as a Rust module, inserting invalid Rust code will lead to a compile error later on.
///
/// # Example
Expand All @@ -285,6 +289,7 @@ pub fn new_deny(deny_const: BTreeSet<ShadowConst>) -> SdResult<()> {
/// }
///
/// ```
///
pub fn new_hook<F>(f: F) -> SdResult<()>
where
F: FnOnce(&File) -> SdResult<()>,
Expand Down

0 comments on commit 65c5663

Please sign in to comment.