Skip to content

Commit ba80038

Browse files
authored
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.
1 parent a0c4e28 commit ba80038

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/egui/src/data/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ impl Modifiers {
719719
}
720720

721721
/// Checks that the `ctrl/cmd` matches, and that the `shift/alt` of the argument is a subset
722-
/// of the pressed ksey (`self`).
722+
/// of the pressed key (`self`).
723723
///
724724
/// This means that if the pattern has not set `shift`, then `self` can have `shift` set or not.
725725
///

crates/egui_extras/src/loaders/file_loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ impl BytesLoader for FileLoader {
8080
move || {
8181
let result = match std::fs::read(&path) {
8282
Ok(bytes) => {
83-
#[cfg(feature = "mime_guess")]
83+
#[cfg(feature = "file")]
8484
let mime = mime_guess2::from_path(&path)
8585
.first_raw()
8686
.map(|v| v.to_owned());
8787

88-
#[cfg(not(feature = "mime_guess"))]
88+
#[cfg(not(feature = "file"))]
8989
let mime = None;
9090

9191
Ok(File {

0 commit comments

Comments
 (0)