`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:
rustbasic 2024-08-26 18:24:08 +09:00 committed by GitHub
parent a0c4e28b65
commit ba80038f3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -719,7 +719,7 @@ impl Modifiers {
}
/// 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.
///

View File

@ -80,12 +80,12 @@ impl BytesLoader for FileLoader {
move || {
let result = match std::fs::read(&path) {
Ok(bytes) => {
#[cfg(feature = "mime_guess")]
#[cfg(feature = "file")]
let mime = mime_guess2::from_path(&path)
.first_raw()
.map(|v| v.to_owned());
#[cfg(not(feature = "mime_guess"))]
#[cfg(not(feature = "file"))]
let mime = None;
Ok(File {