Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/target
/packages/playwright-tests/web/dist
/packages/playwright-tests/fullstack/dist
/packages/playwright-tests/test-results
/dist
.DS_Store
/examples/assets/test_video.mp4
Expand Down
12 changes: 6 additions & 6 deletions packages/const-serialize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,18 +516,18 @@ const fn char_to_bytes(char: char) -> ([u8; 4], usize) {
bytes[0] = code as u8;
}
2 => {
bytes[0] = (code >> 6 & 0x1F) as u8 | BYTE_CHAR_BOUNDARIES[1];
bytes[0] = ((code >> 6) & 0x1F) as u8 | BYTE_CHAR_BOUNDARIES[1];
bytes[1] = (code & 0x3F) as u8 | CONTINUED_CHAR_MASK;
}
3 => {
bytes[0] = (code >> 12 & 0x0F) as u8 | BYTE_CHAR_BOUNDARIES[2];
bytes[1] = (code >> 6 & 0x3F) as u8 | CONTINUED_CHAR_MASK;
bytes[0] = ((code >> 12) & 0x0F) as u8 | BYTE_CHAR_BOUNDARIES[2];
bytes[1] = ((code >> 6) & 0x3F) as u8 | CONTINUED_CHAR_MASK;
bytes[2] = (code & 0x3F) as u8 | CONTINUED_CHAR_MASK;
}
4 => {
bytes[0] = (code >> 18 & 0x07) as u8 | BYTE_CHAR_BOUNDARIES[3];
bytes[1] = (code >> 12 & 0x3F) as u8 | CONTINUED_CHAR_MASK;
bytes[2] = (code >> 6 & 0x3F) as u8 | CONTINUED_CHAR_MASK;
bytes[0] = ((code >> 18) & 0x07) as u8 | BYTE_CHAR_BOUNDARIES[3];
bytes[1] = ((code >> 12) & 0x3F) as u8 | CONTINUED_CHAR_MASK;
bytes[2] = ((code >> 6) & 0x3F) as u8 | CONTINUED_CHAR_MASK;
bytes[3] = (code & 0x3F) as u8 | CONTINUED_CHAR_MASK;
}
_ => panic!(
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,12 @@ pub struct Template {

// Are identical static items merged in the current build. Rust doesn't have a cfg(merge_statics) attribute
// so we have to check this manually
#[allow(unpredictable_function_pointer_comparisons)]
#[allow(unpredictable_function_pointer_comparisons)] // This attribute should be removed once MSRV is 1.85 or greater and the below change is made
fn static_items_merged() -> bool {
fn a() {}
fn b() {}

a as fn() == b as fn()
// std::ptr::fn_addr_eq(a as fn(), b as fn()) <<<<---- This should replace the a as fn() === b as fn() once the MSRV is 1.85 or greater
}

impl std::hash::Hash for Template {
Expand Down
2 changes: 1 addition & 1 deletion packages/dioxus/src/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl LaunchBuilder {
/// # Example
/// ```rust, no_run
/// use dioxus::prelude::*;
/// use dioxus_desktop::{Config,WindowBuilder};
/// use dioxus_desktop::{Config, WindowBuilder};
///
/// fn app() -> Element {
/// rsx! {
Expand Down
7 changes: 4 additions & 3 deletions packages/html/src/events/mounted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ impl_event! [
///
/// The `MountedData` struct contains cross platform APIs that work on the desktop, mobile, liveview and web platforms. For the web platform, you can also downcast the `MountedData` event to the `web-sys::Element` type for more web specific APIs:
///
/// ```rust, no_run
/// # use dioxus::prelude::*;
/// # use dioxus_web::WebEventExt;
/// ```rust, ignore
/// use dioxus::prelude::*;
/// use dioxus_web::WebEventExt; // provides [`as_web_event()`] method
///
/// fn App() -> Element {
/// rsx! {
/// div {
Expand Down
4 changes: 2 additions & 2 deletions packages/logger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub use tracing;
///
/// # Example
///
/// ```rust,no_run
/// ```rust, ignore
/// use dioxus::prelude::*;
/// use tracing::info;
///
Expand Down Expand Up @@ -55,7 +55,7 @@ pub fn initialize_default() {
///
/// # Example
///
/// ```rust,no_run
/// ```rust, ignore
/// use dioxus::prelude::*;
/// use dioxus::logger::tracing::{Level, info};
///
Expand Down
15 changes: 12 additions & 3 deletions packages/router/src/contexts/outlet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,19 @@ impl<R> OutletContext<R> {
/// # Examples
///
/// ```rust, no_run
/// # use dioxus::prelude::*;
/// # use dioxus_lib::prelude::*;
/// # use dioxus_router::prelude::{use_outlet_context,Routable};
///
/// #[derive(Clone)]
/// struct MyRouter;
/// # #[derive(Routable,Clone,PartialEq)]
/// # enum MyRouter {
/// # #[route("/")]
/// # MyView
/// # }
///
/// # #[component]
/// # fn MyView() -> Element {
/// # rsx!{ div { "My Text" } }
/// # }
///
/// let outlet_ctx = use_outlet_context::<MyRouter>();
/// println!("Current nesting level: {}", outlet_ctx.level());
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm-split/wasm-split-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pub fn wasm_split(args: TokenStream, input: TokenStream) -> TokenStream {
/// Create a lazy loader for a given function. Meant to be used in statics. Designed for libraries to
/// integrate with.
///
/// ```rust, no_run
/// ```rust, ignore
/// fn SomeFunction(args: Args) -> Ret {}
///
/// static LOADER: wasm_split::LazyLoader<Args, Ret> = lazy_loader!(SomeFunction);
Expand Down
2 changes: 1 addition & 1 deletion packages/wasm-split/wasm-split/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl std::fmt::Display for SplitLoaderError {
/// which module the function should be loaded from. If you don't know which module to use, use `auto`
/// and wasm-split will automatically combine all the modules into one.
///
/// ```rust, no_run
/// ```rust, ignore
/// static LOADER: wasm_split::LazyLoader<Args, Ret> = wasm_split::lazy_loader!(extern "auto" fn SomeFunction(args: Args) -> Ret);
///
/// fn SomeFunction(args: Args) -> Ret {
Expand Down