diff --git a/tools/ci-build/sdk-lints/src/lib_rs_attr.rs b/tools/ci-build/sdk-lints/src/lib_rs_attr.rs index 52009d22386..4a226dc9d99 100644 --- a/tools/ci-build/sdk-lints/src/lib_rs_attr.rs +++ b/tools/ci-build/sdk-lints/src/lib_rs_attr.rs @@ -3,10 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ +use std::path::{Path, PathBuf}; + use crate::all_runtime_crates; use crate::anchor::replace_anchor; -use crate::lint::{Check, Fix, Lint, LintError}; -use std::path::{Path, PathBuf}; +use crate::lint::{Fix, Lint, LintError}; /// Manages a standard set of `#![crate_level]` attributes pub(super) struct StandardizedRuntimeCrateLibRsAttributes; @@ -43,7 +44,7 @@ impl Fix for StandardizedRuntimeCrateLibRsAttributes { // Find the end of the license header if let Some(pos) = contents.find("*/") { let newline = contents[pos..] - .find("\n") + .find('\n') .ok_or(anyhow::Error::msg("couldn't find a newline"))? + 1 + pos;