Skip to content

Commit 90ef64e

Browse files
lint
1 parent 4d8c2cf commit 90ef64e

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/devtools-core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ bytes = "1.5.0"
2929
ringbuf = "0.4.0-rc.3"
3030
async-stream = "0.3.5"
3131
http = "0.2"
32+
hyper = "0.14"
33+
tower = "0.4"

crates/devtools-core/src/server.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@ pub struct Server {
4444
}
4545

4646
/// A handle to a server that is allowed to modify its properties (such as CORS allowed origins)
47+
#[allow(clippy::module_name_repetitions)]
4748
#[derive(Clone)]
4849
pub struct ServerHandle {
4950
allowed_origins: Arc<Mutex<Vec<AllowOrigin>>>,
5051
}
5152

5253
impl ServerHandle {
54+
/// Allow the given origin in the instrumentation server CORS.
55+
#[allow(clippy::missing_panics_doc)]
5356
pub fn allow_origin(&self, origin: impl Into<AllowOrigin>) {
5457
self.allowed_origins.lock().unwrap().push(origin.into());
5558
}
@@ -158,6 +161,7 @@ impl Server {
158161
}
159162
}
160163

164+
#[must_use]
161165
pub fn handle(&self) -> ServerHandle {
162166
self.handle.clone()
163167
}

0 commit comments

Comments
 (0)