mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
update comments
This commit is contained in:
parent
fc48a08be9
commit
7d837c552b
1 changed files with 2 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ impl Mime {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create new `Self` from `std::Path`
|
/// Create new `Self` from `std::Path` that includes file **extension**
|
||||||
pub fn from_path(path: &Path) -> Result<Self, Error> {
|
pub fn from_path(path: &Path) -> Result<Self, Error> {
|
||||||
match path.extension().and_then(|extension| extension.to_str()) {
|
match path.extension().and_then(|extension| extension.to_str()) {
|
||||||
// Text
|
// Text
|
||||||
|
|
@ -123,6 +123,7 @@ impl Mime {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create new `Self` from [Uri](https://docs.gtk.org/glib/struct.Uri.html)
|
/// Create new `Self` from [Uri](https://docs.gtk.org/glib/struct.Uri.html)
|
||||||
|
/// that includes file **extension**
|
||||||
pub fn from_uri(uri: &Uri) -> Result<Self, Error> {
|
pub fn from_uri(uri: &Uri) -> Result<Self, Error> {
|
||||||
Self::from_path(Path::new(&uri.to_string()))
|
Self::from_path(Path::new(&uri.to_string()))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue