Improve documentation

This commit is contained in:
Edgar Geier 2023-03-12 10:30:27 +01:00
parent 384c5c1fdc
commit 3331f41d7a
No known key found for this signature in database
GPG key ID: DE2B55319457EB56
6 changed files with 37 additions and 14 deletions

View file

@ -60,8 +60,13 @@ impl<'a> SyntaxEditor<'a> {
})
}
/// Load text from a file, and also set syntax to the best option
///
/// ## Errors
///
/// Returns an [`io::Error`] if reading the file fails
#[cfg(feature = "std")]
pub(crate) fn load_text<P: AsRef<Path>>(
pub fn load_text<P: AsRef<Path>>(
&mut self,
font_system: &mut FontSystem,
path: P,