diff --git a/core/lib/src/rocket.rs b/core/lib/src/rocket.rs index a48d2989..e9188125 100644 --- a/core/lib/src/rocket.rs +++ b/core/lib/src/rocket.rs @@ -133,7 +133,6 @@ use crate::log::PaintExt; /// rocket::build() /// } /// ``` -#[must_use] pub struct Rocket(pub(crate) P::State); impl Rocket { @@ -152,6 +151,7 @@ impl Rocket { /// rocket::build() /// } /// ``` + #[must_use] #[inline(always)] pub fn build() -> Self { Rocket::custom(Config::figment()) @@ -178,6 +178,7 @@ impl Rocket { /// rocket::custom(figment) /// } /// ``` + #[must_use] pub fn custom(provider: T) -> Self { // We initialize the logger here so that logging from fairings and so on // are visible; we use the final config to set a max log-level in ignite @@ -235,6 +236,7 @@ impl Rocket { /// # Ok(()) /// # }); /// ``` + #[must_use] pub fn configure(mut self, provider: T) -> Self { self.figment = Figment::from(provider); self @@ -334,6 +336,7 @@ impl Rocket { /// rocket::build().mount("/hello", vec![hi_route]) /// } /// ``` + #[must_use] #[track_caller] pub fn mount<'a, B, R>(self, base: B, routes: R) -> Self where B: TryInto> + Clone + fmt::Display, @@ -373,6 +376,7 @@ impl Rocket { /// rocket::build().register("/", catchers![internal_error, not_found]) /// } /// ``` + #[must_use] pub fn register<'a, B, C>(self, base: B, catchers: C) -> Self where B: TryInto> + Clone + fmt::Display, B::Error: fmt::Display, @@ -424,6 +428,7 @@ impl Rocket { /// .mount("/", routes![int, string]) /// } /// ``` + #[must_use] pub fn manage(self, state: T) -> Self where T: Send + Sync + 'static { @@ -457,6 +462,7 @@ impl Rocket { /// }))) /// } /// ``` + #[must_use] pub fn attach(mut self, fairing: F) -> Self { self.fairings.add(Box::new(fairing)); self