Chore: move todo!() to unimplemented!() (#2558)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-06-27 16:27:27 -05:00
1 parent 8bba6d6672
commit 47ab4c8db9
10 files changed
+24 -24

No files matched your search

+2 -2
View File
@@ -454,7 +454,7 @@ impl VNode {
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # let enabled = true; /// # let enabled = true;
/// # #[component] /// # #[component]
/// # fn Component(enabled_sign: String) -> Element { todo!() } /// # fn Component(enabled_sign: String) -> Element { unimplemented!() }
/// if enabled { /// if enabled {
/// rsx!{ Component { enabled_sign: "abc" } } /// rsx!{ Component { enabled_sign: "abc" } }
/// } else { /// } else {
@@ -468,7 +468,7 @@ impl VNode {
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # #[component] /// # #[component]
/// # fn Component(enabled_sign: String) -> Element { todo!() } /// # fn Component(enabled_sign: String) -> Element { unimplemented!() }
/// # let enabled = true; /// # let enabled = true;
/// let props = if enabled { /// let props = if enabled {
/// ComponentProps { enabled_sign: "abc".to_string() } /// ComponentProps { enabled_sign: "abc".to_string() }
+1 -1
View File
@@ -455,7 +455,7 @@ impl<
/// ///
/// ```rust /// ```rust
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # fn ThrowsError() -> Element { todo!() } /// # fn ThrowsError() -> Element { unimplemented!() }
/// rsx! { /// rsx! {
/// ErrorBoundary { /// ErrorBoundary {
/// handle_error: |error| rsx! { "Oops, we encountered an error. Please report {error} to the developer of this application" }, /// handle_error: |error| rsx! { "Oops, we encountered an error. Please report {error} to the developer of this application" },
+2 -2
View File
@@ -151,10 +151,10 @@ use tracing::instrument;
/// # Self {} /// # Self {}
/// # } /// # }
/// # fn apply(&mut self) -> Mutations { /// # fn apply(&mut self) -> Mutations {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// # async fn wait_for_event(&mut self) -> std::rc::Rc<dyn std::any::Any> { /// # async fn wait_for_event(&mut self) -> std::rc::Rc<dyn std::any::Any> {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// # } /// # }
/// # /// #
+1 -1
View File
@@ -220,7 +220,7 @@ where
Method::GET => self.route(path, get(handler)), Method::GET => self.route(path, get(handler)),
Method::POST => self.route(path, post(handler)), Method::POST => self.route(path, post(handler)),
Method::PUT => self.route(path, put(handler)), Method::PUT => self.route(path, put(handler)),
_ => todo!(), _ => unimplemented!("Unsupported server function method: {}", method),
}; };
} }
+1 -1
View File
@@ -14,7 +14,7 @@ pub fn use_sorted<V: 'static, T: PartialEq>(
// I: DerefMut<Target = [T]> + Clone + PartialEq, // I: DerefMut<Target = [T]> + Clone + PartialEq,
{ {
use_memo(move || { use_memo(move || {
todo!() unimplemented!()
// let mut iterable = collection(); // let mut iterable = collection();
// iterable.sort(); // iterable.sort();
// iterable // iterable
+4 -4
View File
@@ -230,7 +230,7 @@ macro_rules! impl_element {
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # let attributes = vec![]; /// # let attributes = vec![];
/// # fn ChildComponent() -> Element { todo!() } /// # fn ChildComponent() -> Element { unimplemented!() }
/// # let raw_expression: Element = rsx! {}; /// # let raw_expression: Element = rsx! {};
/// rsx! { /// rsx! {
/// // Elements are followed by braces that surround any attributes and children for that element /// // Elements are followed by braces that surround any attributes and children for that element
@@ -283,7 +283,7 @@ macro_rules! impl_element {
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # let attributes = vec![]; /// # let attributes = vec![];
/// # fn ChildComponent() -> Element { todo!() } /// # fn ChildComponent() -> Element { unimplemented!() }
/// # let raw_expression: Element = rsx! {}; /// # let raw_expression: Element = rsx! {};
/// rsx! { /// rsx! {
/// // Elements are followed by braces that surround any attributes and children for that element /// // Elements are followed by braces that surround any attributes and children for that element
@@ -337,7 +337,7 @@ macro_rules! impl_element {
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # let attributes = vec![]; /// # let attributes = vec![];
/// # fn ChildComponent() -> Element { todo!() } /// # fn ChildComponent() -> Element { unimplemented!() }
/// # let raw_expression: Element = rsx! {}; /// # let raw_expression: Element = rsx! {};
/// rsx! { /// rsx! {
/// // Elements are followed by braces that surround any attributes and children for that element /// // Elements are followed by braces that surround any attributes and children for that element
@@ -584,7 +584,7 @@ macro_rules! builder_constructors {
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # let attributes = vec![]; /// # let attributes = vec![];
/// # fn ChildComponent() -> Element { todo!() } /// # fn ChildComponent() -> Element { unimplemented!() }
/// # let raw_expression: Element = rsx! {}; /// # let raw_expression: Element = rsx! {};
/// rsx! { /// rsx! {
/// // Elements are followed by braces that surround any attributes and children for that element /// // Elements are followed by braces that surround any attributes and children for that element
+6 -6
View File
@@ -64,7 +64,7 @@ impl<E: Display> Display for RouteParseError<E> {
/// ///
/// # #[component] /// # #[component]
/// # fn Home(query: CustomQuery) -> Element { /// # fn Home(query: CustomQuery) -> Element {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// ``` /// ```
#[rustversion::attr( #[rustversion::attr(
@@ -132,7 +132,7 @@ impl<T: for<'a> From<&'a str>> FromQuery for T {
/// ///
/// # #[component] /// # #[component]
/// # fn Home(query: CustomQuery, other: i32) -> Element { /// # fn Home(query: CustomQuery, other: i32) -> Element {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// ``` /// ```
#[rustversion::attr( #[rustversion::attr(
@@ -190,7 +190,7 @@ where
/// ///
/// #[component] /// #[component]
/// fn Home(url_hash: State) -> Element { /// fn Home(url_hash: State) -> Element {
/// todo!() /// unimplemented!()
/// } /// }
/// ///
/// ///
@@ -301,7 +301,7 @@ where
/// ///
/// # #[component] /// # #[component]
/// # fn Home(route_segment_one: CustomRouteSegment, route_segment_two: i32) -> Element { /// # fn Home(route_segment_one: CustomRouteSegment, route_segment_two: i32) -> Element {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// ``` /// ```
#[rustversion::attr( #[rustversion::attr(
@@ -388,7 +388,7 @@ fn full_circle() {
/// ///
/// # #[component] /// # #[component]
/// # fn Home(numeric_route_segments: NumericRouteSegments) -> Element { /// # fn Home(numeric_route_segments: NumericRouteSegments) -> Element {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// ``` /// ```
pub trait ToRouteSegments { pub trait ToRouteSegments {
@@ -478,7 +478,7 @@ fn to_route_segments() {
/// ///
/// # #[component] /// # #[component]
/// # fn Home(numeric_route_segments: NumericRouteSegments) -> Element { /// # fn Home(numeric_route_segments: NumericRouteSegments) -> Element {
/// # todo!() /// # unimplemented!()
/// # } /// # }
/// ``` /// ```
#[rustversion::attr( #[rustversion::attr(
+4 -4
View File
@@ -22,22 +22,22 @@ fn with_class() {
#[component] #[component]
fn Test() -> Element { fn Test() -> Element {
todo!() unimplemented!()
} }
#[component] #[component]
fn Root() -> Element { fn Root() -> Element {
todo!() unimplemented!()
} }
#[component] #[component]
fn ChildRoot() -> Element { fn ChildRoot() -> Element {
todo!() unimplemented!()
} }
#[component] #[component]
fn NotStatic(not_static: String) -> Element { fn NotStatic(not_static: String) -> Element {
todo!() unimplemented!()
} }
assert_eq!( assert_eq!(
+1 -1
View File
@@ -53,7 +53,7 @@ use syn::__private::ToTokens;
/// output = Json /// output = Json
/// )] /// )]
/// pub async fn my_wacky_server_fn(input: Vec<String>) -> Result<usize, ServerFnError> { /// pub async fn my_wacky_server_fn(input: Vec<String>) -> Result<usize, ServerFnError> {
/// todo!() /// unimplemented!()
/// } /// }
/// ///
/// // expands to /// // expands to
+2 -2
View File
@@ -272,7 +272,7 @@ impl<T: 'static, S: Storage<SignalData<T>>> Signal<T, S> {
/// main.rs: /// main.rs:
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # fn Child() -> Element { todo!() } /// # fn Child() -> Element { unimplemented!() }
/// fn app() -> Element { /// fn app() -> Element {
/// let signal = use_context_provider(|| Signal::new(0)); /// let signal = use_context_provider(|| Signal::new(0));
/// ///
@@ -308,7 +308,7 @@ impl<T: 'static, S: Storage<SignalData<T>>> Signal<T, S> {
/// main.rs: /// main.rs:
/// ```rust, no_run /// ```rust, no_run
/// # use dioxus::prelude::*; /// # use dioxus::prelude::*;
/// # fn Child() -> Element { todo!() } /// # fn Child() -> Element { unimplemented!() }
/// fn app() -> Element { /// fn app() -> Element {
/// let mut signal = use_context_provider(|| Signal::new(0)); /// let mut signal = use_context_provider(|| Signal::new(0));
/// ///