`egui_extras`: Fix file mime from path (wrong feature name) (#4933)
Fix: features "mime_guess" to "file" typo: 1 Is this what you intended? If you intended to add `mime_guess` to `cargo.toml`, please drop it.
This commit is contained in:
parent
a0c4e28b65
commit
ba80038f3d
|
|
@ -719,7 +719,7 @@ impl Modifiers {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Checks that the `ctrl/cmd` matches, and that the `shift/alt` of the argument is a subset
|
/// Checks that the `ctrl/cmd` matches, and that the `shift/alt` of the argument is a subset
|
||||||
/// of the pressed ksey (`self`).
|
/// of the pressed key (`self`).
|
||||||
///
|
///
|
||||||
/// This means that if the pattern has not set `shift`, then `self` can have `shift` set or not.
|
/// This means that if the pattern has not set `shift`, then `self` can have `shift` set or not.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -80,12 +80,12 @@ impl BytesLoader for FileLoader {
|
||||||
move || {
|
move || {
|
||||||
let result = match std::fs::read(&path) {
|
let result = match std::fs::read(&path) {
|
||||||
Ok(bytes) => {
|
Ok(bytes) => {
|
||||||
#[cfg(feature = "mime_guess")]
|
#[cfg(feature = "file")]
|
||||||
let mime = mime_guess2::from_path(&path)
|
let mime = mime_guess2::from_path(&path)
|
||||||
.first_raw()
|
.first_raw()
|
||||||
.map(|v| v.to_owned());
|
.map(|v| v.to_owned());
|
||||||
|
|
||||||
#[cfg(not(feature = "mime_guess"))]
|
#[cfg(not(feature = "file"))]
|
||||||
let mime = None;
|
let mime = None;
|
||||||
|
|
||||||
Ok(File {
|
Ok(File {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue