From c916f034da83440a40200d8d3297a7f6333036c6 Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Thu, 13 Jul 2023 02:24:22 +0200 Subject: [PATCH] Disable docstests --- rustfmt.toml | 1 + src/lib.rs | 3 +-- src/state.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 rustfmt.toml diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..16bdde9 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +format_code_in_doc_comments = true diff --git a/src/lib.rs b/src/lib.rs index 4f96d3c..4c3102f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,7 +83,7 @@ impl<'a> DerefMut for Dnd<'a> { /// Use either [Dnd::show] or [Dnd::show_vec] to display the drag and drop UI. /// You can use [DragDropUi::with_mouse_config] or [DragDropUi::with_touch_config] to configure the drag detection. /// Example usage: -/// ```rust +/// ```rust;no_run /// use std::hash::Hash; /// use eframe::egui; /// use egui::CentralPanel; @@ -106,7 +106,6 @@ impl<'a> DerefMut for Dnd<'a> { /// }); /// }) /// } -/// /// ``` pub fn dnd(ui: &mut egui::Ui, id_source: impl Hash) -> Dnd { let id = Id::new(id_source).with("dnd"); diff --git a/src/state.rs b/src/state.rs index b2f1923..cb7cf75 100644 --- a/src/state.rs +++ b/src/state.rs @@ -370,7 +370,7 @@ impl DragDropConfig { /// [DragDropUi] stores the state of the Drag & Drop list. /// # Example -/// ```rust +/// ```rust;no_run /// use egui_dnd::DragDropUi; /// use eframe::App; /// use eframe::egui::Context;