Add space between rsx and exclamation point (#2956)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-09-13 08:31:39 -05:00
1 parent 8d68886310
commit c7124e41fb
6 files changed
+12 -12

No files matched your search

+3 -3
View File
@@ -106,7 +106,7 @@ pub trait Context<T, E>: private::Sealed {
/// "Error parsing number: {error}" /// "Error parsing number: {error}"
/// } /// }
/// })?; /// })?;
/// todo!() /// unimplemented!()
/// } /// }
/// ``` /// ```
fn show(self, display_error: impl FnOnce(&E) -> Element) -> Result<T>; fn show(self, display_error: impl FnOnce(&E) -> Element) -> Result<T>;
@@ -120,7 +120,7 @@ pub trait Context<T, E>: private::Sealed {
/// // You can bubble up errors with `?` inside components, and event handlers /// // You can bubble up errors with `?` inside components, and event handlers
/// // Along with the error itself, you can provide a way to display the error by calling `context` /// // Along with the error itself, you can provide a way to display the error by calling `context`
/// let number = "-1234".parse::<usize>().context("Parsing number inside of the NumberParser")?; /// let number = "-1234".parse::<usize>().context("Parsing number inside of the NumberParser")?;
/// todo!() /// unimplemented!()
/// } /// }
/// ``` /// ```
fn context<C: Display + 'static>(self, context: C) -> Result<T>; fn context<C: Display + 'static>(self, context: C) -> Result<T>;
@@ -134,7 +134,7 @@ pub trait Context<T, E>: private::Sealed {
/// // You can bubble up errors with `?` inside components, and event handlers /// // You can bubble up errors with `?` inside components, and event handlers
/// // Along with the error itself, you can provide a way to display the error by calling `context` /// // Along with the error itself, you can provide a way to display the error by calling `context`
/// let number = "-1234".parse::<usize>().with_context(|| format!("Timestamp: {:?}", std::time::Instant::now()))?; /// let number = "-1234".parse::<usize>().with_context(|| format!("Timestamp: {:?}", std::time::Instant::now()))?;
/// todo!() /// unimplemented!()
/// } /// }
/// ``` /// ```
fn with_context<C: Display + 'static>(self, context: impl FnOnce() -> C) -> Result<T>; fn with_context<C: Display + 'static>(self, context: impl FnOnce() -> C) -> Result<T>;
+2 -2
View File
@@ -25,13 +25,13 @@ pub fn vdom_is_rendering() -> bool {
/// fn Component() -> Element { /// fn Component() -> Element {
/// let request = spawn(async move { /// let request = spawn(async move {
/// match reqwest::get("https://api.example.com").await { /// match reqwest::get("https://api.example.com").await {
/// Ok(_) => todo!(), /// Ok(_) => unimplemented!(),
/// // You can explicitly throw an error into a scope with throw_error /// // You can explicitly throw an error into a scope with throw_error
/// Err(err) => ScopeId::APP.throw_error(err) /// Err(err) => ScopeId::APP.throw_error(err)
/// } /// }
/// }); /// });
/// ///
/// todo!() /// unimplemented!()
/// } /// }
/// ``` /// ```
pub fn throw_error(error: impl Into<CapturedError> + 'static) { pub fn throw_error(error: impl Into<CapturedError> + 'static) {
+2 -2
View File
@@ -558,13 +558,13 @@ impl ScopeId {
/// fn Component() -> Element { /// fn Component() -> Element {
/// let request = spawn(async move { /// let request = spawn(async move {
/// match reqwest::get("https://api.example.com").await { /// match reqwest::get("https://api.example.com").await {
/// Ok(_) => todo!(), /// Ok(_) => unimplemented!(),
/// // You can explicitly throw an error into a scope with throw_error /// // You can explicitly throw an error into a scope with throw_error
/// Err(err) => ScopeId::APP.throw_error(err) /// Err(err) => ScopeId::APP.throw_error(err)
/// } /// }
/// }); /// });
/// ///
/// todo!() /// unimplemented!()
/// } /// }
/// ``` /// ```
pub fn throw_error(self, error: impl Into<CapturedError> + 'static) { pub fn throw_error(self, error: impl Into<CapturedError> + 'static) {
@@ -17,7 +17,7 @@ use serde::{de::DeserializeOwned, Serialize};
/// 1234 /// 1234
/// }); /// });
/// ///
/// todo!() /// unimplemented!()
/// } /// }
/// ``` /// ```
pub fn use_server_cached<O: 'static + Clone + Serialize + DeserializeOwned>( pub fn use_server_cached<O: 'static + Clone + Serialize + DeserializeOwned>(
@@ -40,7 +40,7 @@ use std::future::Future;
/// ///
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # async fn fetch_article(id: u32) -> String { todo!() } /// # async fn fetch_article(id: u32) -> String { unimplemented!() }
/// use dioxus::prelude::*; /// use dioxus::prelude::*;
/// ///
/// fn App() -> Element { /// fn App() -> Element {
+3 -3
View File
@@ -3,17 +3,17 @@ use std::str::FromStr;
#[component] #[component]
fn Root() -> Element { fn Root() -> Element {
todo!() unimplemented!()
} }
#[component] #[component]
fn Test() -> Element { fn Test() -> Element {
todo!() unimplemented!()
} }
#[component] #[component]
fn Dynamic(id: usize) -> Element { fn Dynamic(id: usize) -> Element {
todo!() unimplemented!()
} }
// Make sure trailing '/'s work correctly // Make sure trailing '/'s work correctly