1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-23 05:07:46 +00:00

Fix misc warnings

This commit is contained in:
Joshua Goins 2022-08-09 23:39:15 -04:00
parent 59913434e6
commit 6f9b5c59d7
4 changed files with 3 additions and 6 deletions

View file

@ -1,6 +1,5 @@
use std::fs;
use std::path::PathBuf;
use crate::gamedata::MemoryBuffer;
use crate::patch::{apply_patch, PatchError};
/// Boot data for FFXIV.

View file

@ -1,4 +1,3 @@
use std::ffi::CString;
use std::fs::read;
use std::io::Cursor;
use binrw::binrw;

View file

@ -1,6 +1,6 @@
use std::fs;
use std::fs::DirEntry;
use std::path::{Path, PathBuf};
use std::path::PathBuf;
use crate::common::Language;
use crate::dat::DatFile;
use crate::exd::EXD;

View file

@ -1,5 +1,4 @@
use std::io::{Cursor, Seek, SeekFrom};
use std::os::unix::raw::time_t;
use binrw::binread;
use crate::gamedata::MemoryBuffer;
use binrw::BinRead;
@ -71,7 +70,7 @@ impl ChatLog {
let content_offset = (8 + header.file_size * 4) as u64;
// beginning of content offset
cursor.seek(SeekFrom::Start(content_offset));
cursor.seek(SeekFrom::Start(content_offset)).ok()?;
let mut entries = vec![];
@ -83,7 +82,7 @@ impl ChatLog {
// TODO: handle the coloring properly, in some way
entry.message = String::from_utf8_lossy(&*buffer[cursor.position() as usize..new_last_offset as usize].to_vec()).to_string();
cursor.seek(SeekFrom::Start(new_last_offset));
cursor.seek(SeekFrom::Start(new_last_offset)).ok()?;
entries.push(entry);
}