on master help sign in
Fix doc warnings
9856257Ivan Tham
helix-term/src/compositor.rs+7−7
@@ -178,13 +178,13 @@ pub trait AnyComponent {
178 /// Returns a boxed any from a boxed self.
178 /// Returns a boxed any from a boxed self.
179 ///
179 ///
180 /// Can be used before `Box::downcast()`.
180 /// Can be used before `Box::downcast()`.
181− ///
181+ //
182− /// # Examples
182+ // # Examples
183− ///
183+ //
184− /// ```rust
184+ // ```rust
185− /// // let boxed: Box<Component> = Box::new(TextComponent::new("text"));
185+ // let boxed: Box<Component> = Box::new(TextComponent::new("text"));
186− /// // let text: Box<TextComponent> = boxed.as_boxed_any().downcast().unwrap();
186+ // let text: Box<TextComponent> = boxed.as_boxed_any().downcast().unwrap();
187− /// ```
187+ // ```
188 fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
188 fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
189}
189}
190
190
helix-tui/src/lib.rs+1−1
@@ -44,7 +44,7 @@
44//! implement your own.
44//! implement your own.
45//!
45//!
46//! Each widget follows a builder pattern API providing a default configuration along with methods
46//! Each widget follows a builder pattern API providing a default configuration along with methods
47−//! to customize them. The widget is then rendered using the [`Frame::render_widget`] which take
47+//! to customize them. The widget is then rendered using the `Frame::render_widget` which take
48//! your widget instance an area to draw to.
48//! your widget instance an area to draw to.
49//!
49//!
50//! The following example renders a block of the size of the terminal:
50//! The following example renders a block of the size of the terminal:
helix-tui/src/widgets/mod.rs+1−1
@@ -1,4 +1,4 @@
1−//! `widgets` is a collection of types that implement [`Widget`] or [`StatefulWidget`] or both.
1+//! `widgets` is a collection of types that implement [`Widget`].
2//!
2//!
3//! All widgets are implemented using the builder pattern and are consumable objects. They are not
3//! All widgets are implemented using the builder pattern and are consumable objects. They are not
4//! meant to be stored but used as *commands* to draw common figures in the UI.
4//! meant to be stored but used as *commands* to draw common figures in the UI.
helix-view/src/document.rs+1−1
@@ -165,7 +165,7 @@ pub fn fold_home_dir(path: &Path) -> PathBuf {
165/// [`std::fs::canonicalize`] can be hard to use correctly, since it can often
165/// [`std::fs::canonicalize`] can be hard to use correctly, since it can often
166/// fail, or on Windows returns annoying device paths. This is a problem Cargo
166/// fail, or on Windows returns annoying device paths. This is a problem Cargo
167/// needs to improve on.
167/// needs to improve on.
168−/// Copied from cargo: https://github.com/rust-lang/cargo/blob/070e459c2d8b79c5b2ac5218064e7603329c92ae/crates/cargo-util/src/paths.rs#L81
168+/// Copied from cargo: <https://github.com/rust-lang/cargo/blob/070e459c2d8b79c5b2ac5218064e7603329c92ae/crates/cargo-util/src/paths.rs#L81>
169pub fn normalize_path(path: &Path) -> PathBuf {
169pub fn normalize_path(path: &Path) -> PathBuf {
170 let path = expand_tilde(path);
170 let path = expand_tilde(path);
171 let mut components = path.components().peekable();
171 let mut components = path.components().peekable();