build: bump MSRV to 1.76.0 (#5586)

This commit is contained in:
Sanchith Hegde
2024-08-12 15:30:05 +05:30
committed by GitHub
parent 7718800e1f
commit 59b36a054c
90 changed files with 255 additions and 260 deletions

View File

@ -1,4 +1,3 @@
#![forbid(unsafe_code)]
#![warn(missing_debug_implementations)]
//!

View File

@ -151,6 +151,8 @@ impl Config {
.add_source(config::Environment::with_prefix("ROUTER").separator("__"))
.build()?;
// The logger may not yet be initialized when constructing the application configuration
#[allow(clippy::print_stderr)]
serde_path_to_error::deserialize(config).map_err(|error| {
crate::error!(%error, "Unable to deserialize configuration");
eprintln!("Unable to deserialize application configuration: {error}");

View File

@ -33,6 +33,7 @@ pub struct TelemetryGuard {
/// Setup logging sub-system specifying the logging configuration, service (binary) name, and a
/// list of external crates for which a more verbose logging must be enabled. All crates within the
/// current cargo workspace are automatically considered for verbose logging.
#[allow(clippy::print_stdout)] // The logger hasn't been initialized yet
pub fn setup(
config: &config::Log,
service_name: &str,
@ -271,6 +272,7 @@ fn setup_tracing_pipeline(
.install_batch(runtime::TokioCurrentThread)
.map(|tracer| tracing_opentelemetry::layer().with_tracer(tracer));
#[allow(clippy::print_stderr)] // The logger hasn't been initialized yet
if config.ignore_errors {
traces_layer_result
.map_err(|error| {
@ -315,6 +317,7 @@ fn setup_metrics_pipeline(config: &config::LogTelemetry) -> Option<BasicControll
)]))
.build();
#[allow(clippy::print_stderr)] // The logger hasn't been initialized yet
if config.ignore_errors {
metrics_controller_result
.map_err(|error| eprintln!("Failed to setup metrics pipeline: {error:?}"))