mirror of https://github.com/helix-editor/helix
Fix doc warnings
parent
eaf259f8aa
commit
985625763a
|
@ -178,13 +178,13 @@ pub trait AnyComponent {
|
||||||
/// Returns a boxed any from a boxed self.
|
/// Returns a boxed any from a boxed self.
|
||||||
///
|
///
|
||||||
/// Can be used before `Box::downcast()`.
|
/// Can be used before `Box::downcast()`.
|
||||||
///
|
//
|
||||||
/// # Examples
|
// # Examples
|
||||||
///
|
//
|
||||||
/// ```rust
|
// ```rust
|
||||||
/// // let boxed: Box<Component> = Box::new(TextComponent::new("text"));
|
// let boxed: Box<Component> = Box::new(TextComponent::new("text"));
|
||||||
/// // let text: Box<TextComponent> = boxed.as_boxed_any().downcast().unwrap();
|
// let text: Box<TextComponent> = boxed.as_boxed_any().downcast().unwrap();
|
||||||
/// ```
|
// ```
|
||||||
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
|
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
//! implement your own.
|
//! implement your own.
|
||||||
//!
|
//!
|
||||||
//! Each widget follows a builder pattern API providing a default configuration along with methods
|
//! Each widget follows a builder pattern API providing a default configuration along with methods
|
||||||
//! to customize them. The widget is then rendered using the [`Frame::render_widget`] which take
|
//! to customize them. The widget is then rendered using the `Frame::render_widget` which take
|
||||||
//! your widget instance an area to draw to.
|
//! your widget instance an area to draw to.
|
||||||
//!
|
//!
|
||||||
//! The following example renders a block of the size of the terminal:
|
//! The following example renders a block of the size of the terminal:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//! `widgets` is a collection of types that implement [`Widget`] or [`StatefulWidget`] or both.
|
//! `widgets` is a collection of types that implement [`Widget`].
|
||||||
//!
|
//!
|
||||||
//! All widgets are implemented using the builder pattern and are consumable objects. They are not
|
//! All widgets are implemented using the builder pattern and are consumable objects. They are not
|
||||||
//! meant to be stored but used as *commands* to draw common figures in the UI.
|
//! meant to be stored but used as *commands* to draw common figures in the UI.
|
||||||
|
|
|
@ -165,7 +165,7 @@ pub fn fold_home_dir(path: &Path) -> PathBuf {
|
||||||
/// [`std::fs::canonicalize`] can be hard to use correctly, since it can often
|
/// [`std::fs::canonicalize`] can be hard to use correctly, since it can often
|
||||||
/// fail, or on Windows returns annoying device paths. This is a problem Cargo
|
/// fail, or on Windows returns annoying device paths. This is a problem Cargo
|
||||||
/// needs to improve on.
|
/// needs to improve on.
|
||||||
/// Copied from cargo: https://github.com/rust-lang/cargo/blob/070e459c2d8b79c5b2ac5218064e7603329c92ae/crates/cargo-util/src/paths.rs#L81
|
/// Copied from cargo: <https://github.com/rust-lang/cargo/blob/070e459c2d8b79c5b2ac5218064e7603329c92ae/crates/cargo-util/src/paths.rs#L81>
|
||||||
pub fn normalize_path(path: &Path) -> PathBuf {
|
pub fn normalize_path(path: &Path) -> PathBuf {
|
||||||
let path = expand_tilde(path);
|
let path = expand_tilde(path);
|
||||||
let mut components = path.components().peekable();
|
let mut components = path.components().peekable();
|
||||||
|
|
Loading…
Reference in New Issue