Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug committed Dec 3, 2024
1 parent d91738c commit 4b4737e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions clash_lib/src/app/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ use opentelemetry::{
KeyValue,
};
use opentelemetry_otlp::SpanExporter;
use opentelemetry_sdk::{
trace::{Config, TracerProvider},
Resource,
};
use opentelemetry_sdk::{trace::TracerProvider, Resource};
use opentelemetry_semantic_conventions::{
resource::{DEPLOYMENT_ENVIRONMENT_NAME, SERVICE_NAME, SERVICE_VERSION},
SCHEMA_URL,
Expand Down Expand Up @@ -105,7 +102,7 @@ pub fn setup_logging(
let exporter = SpanExporter::builder().with_tonic().build()?;

let provider = TracerProvider::builder()
.with_config(Config::default().with_resource(Resource::from_schema_url(
.with_resource(Resource::from_schema_url(
[
KeyValue::new(SERVICE_NAME, env!("CARGO_PKG_NAME")),
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
Expand All @@ -115,7 +112,7 @@ pub fn setup_logging(
),
],
SCHEMA_URL,
)))
))
.with_batch_exporter(exporter, opentelemetry_sdk::runtime::Tokio)
.build();

Expand Down
2 changes: 1 addition & 1 deletion clash_lib/src/proxy/wg/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ pub struct RxToken {
impl smoltcp::phy::RxToken for RxToken {
fn consume<R, F>(mut self, f: F) -> R
where
F: FnOnce(&mut [u8]) -> R,
F: FnOnce(&[u8]) -> R,
{
f(&mut self.buffer)
}
Expand Down

0 comments on commit 4b4737e

Please sign in to comment.