We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1953715 commit 012f12bCopy full SHA for 012f12b
obfw/src/reader.rs
@@ -1,5 +1,6 @@
1
use crate::{DumpItem, MAGIC};
2
use core::error::Error;
3
+use core::fmt::{Display, Formatter};
4
use std::boxed::Box;
5
use std::io::{ErrorKind, Read};
6
use thiserror::Error;
@@ -58,6 +59,16 @@ pub enum ItemReader<'a, F> {
58
59
Ps4Part(crate::ps4::PartReader<'a, F>),
60
}
61
62
+impl<'a, F> Display for ItemReader<'a, F> {
63
+ fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
64
+ let name = match self {
65
+ Self::Ps4Part(_) => "PlayStation 4 partition",
66
+ };
67
+
68
+ f.write_str(name)
69
+ }
70
+}
71
72
/// Represents an error when [`DumpReader`] fails to read the dump.
73
#[derive(Debug, Error)]
74
pub enum ReaderError {
0 commit comments