chore: replace blanket #![allow(dead_code)] with #![warn(dead_code)] (#742) (#3974)

This commit is contained in:
Zhengchao An
2026-06-28 07:50:51 +08:00
committed by GitHub
parent 27468ebfa9
commit 113058af54
47 changed files with 47 additions and 47 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use base64_simd::STANDARD;
use std::error::Error;
+1 -1
View File
@@ -1,4 +1,4 @@
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up dead code; see https://github.com/rustfs/backlog/issues/742
// Copyright 2024 RustFS Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Audit metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Cluster config metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Cluster erasure set metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Cluster health metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Cluster IAM metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Cluster usage metrics collector.
//!
+1 -1
View File
@@ -17,7 +17,7 @@
//! This module provides metrics for monitoring the health and performance
//! of the dial9 telemetry system itself.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::MetricType;
use crate::metrics::report::PrometheusMetric;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! ILM (Information Lifecycle Management) metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Notification metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::metrics::report::PrometheusMetric;
use crate::metrics::schema::notification_target::{
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Replication metrics collector.
//!
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! API request metrics collector.
//!
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Scanner metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! System CPU metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! System drive metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! System GPU metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! System memory metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! System network metrics collector.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! System process metrics collector.
//!
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, new_histogram_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_gauge_md};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_gauge_md};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
/// CPU system-related metric descriptors
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! GPU-related metric descriptors.
//!
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_gauge_md, subsystems};
use std::sync::LazyLock;
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
use crate::{MetricDescriptor, MetricName, new_counter_md, new_gauge_md, subsystems};
use std::sync::LazyLock;
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(dead_code)]
#![warn(dead_code)] // Gradually clean up; see https://github.com/rustfs/backlog/issues/742
//! Statistics collection functions for metrics.
//!