From 54c31a27317d4a3db74617db8ec7eae5c9ceca78 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Fri, 8 Dec 2023 10:18:58 -0500 Subject: [PATCH] Fix sdk lints --- tools/ci-build/sdk-lints/src/lib_rs_attr.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;