Browse Source

format

edition-2021
Lynne Megido 3 months ago
parent
commit
bddd6caeb2
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
  1. 2
      src/formats.rs
  2. 16
      src/mime_db.rs

2
src/formats.rs

@ -122,7 +122,7 @@ pub fn smart_write<W: Write>(f: &mut W, writeables: &[Writable]) -> io::Result<(
pub trait FormatSteps {
fn rename<W: Write>(&self, _f: &mut W, _from: &Path, _to: &Path) -> io::Result<()>;
fn no_known_extension<W: Write>(&self, _f: &mut W, _path: &Path) -> io::Result<()> ;
fn no_known_extension<W: Write>(&self, _f: &mut W, _path: &Path) -> io::Result<()>;
fn unreadable<W: Write>(&self, _f: &mut W, _path: &Path) -> io::Result<()>;
fn unknown_type<W: Write>(&self, _f: &mut W, _path: &Path) -> io::Result<()>;
fn header<W: Write>(&self, _f: &mut W, _entries: &Entries) -> io::Result<()>;

16
src/mime_db.rs

@ -47,14 +47,14 @@ cfg_if! {
// as added by https://github.com/bojand/infer/pull/48/files
// this should be removed when (if) that PR is accepted
buf.len() > 11
&& buf[0] == 0x46
&& buf[1] == 0x4F
&& buf[2] == 0x52
&& buf[3] == 0x4D
&& buf[8] == 0x41
&& buf[9] == 0x49
&& buf[10] == 0x46
&& buf[11] == 0x46
&& buf[0] == 0x46
&& buf[1] == 0x4F
&& buf[2] == 0x52
&& buf[3] == 0x4D
&& buf[8] == 0x41
&& buf[9] == 0x49
&& buf[10] == 0x46
&& buf[11] == 0x46
});
info.add("image/svg+xml", "svg", |buf| {

Loading…
Cancel
Save