Skip to content

Commit

Permalink
Replace accidentally platform-specific file extension check
Browse files Browse the repository at this point in the history
  • Loading branch information
nhusung committed Jun 25, 2024
1 parent 0185aff commit 87ccf7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/oxidd-parser/src/load_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// spell-checker:ignore termcolor

use std::fmt;
use std::os::unix::ffi::OsStrExt;
use std::path::Path;

use codespan_reporting::diagnostic::{Diagnostic, Label};
Expand Down Expand Up @@ -39,7 +38,7 @@ impl FileType {
/// Guess the file type based on the given path
pub fn from_path(path: &Path) -> Option<Self> {
let ext = path.extension()?;
match ext.as_bytes() {
match ext.as_encoded_bytes() {
b"cnf" | b"sat" | b"dimacs" => Some(FileType::DIMACS),
b"aag" | b"aig" => Some(FileType::AIGER),
_ => None,
Expand Down

0 comments on commit 87ccf7f

Please sign in to comment.