Upgrade some dependencies
This commit is contained in:
parent
79703a59cd
commit
189f4b824d
@ -27,8 +27,8 @@ clap = "4.0.32"
|
||||
criterion = "0.5.1"
|
||||
derive-where = "1.1.0"
|
||||
derive_builder = "0.20.2"
|
||||
derive_more = "0.99.17"
|
||||
downcast-rs = "1.2.0"
|
||||
derive_more = "2.0.0"
|
||||
downcast-rs = "2.0.1"
|
||||
dyn-clonable = "0.9.0"
|
||||
env_logger = "0.11.3"
|
||||
ffmpeg-sys-next = { version = "7.0.0", default-features = false }
|
||||
@ -43,5 +43,5 @@ pkg-config = "0.3.26"
|
||||
proc-macro2 = "1.0"
|
||||
quote = "1.0"
|
||||
syn = "2.0"
|
||||
thiserror = "1.0.38"
|
||||
thiserror = "2.0.12"
|
||||
uuid = "1.3"
|
||||
|
||||
@ -16,6 +16,6 @@ exclude.workspace = true
|
||||
|
||||
[dependencies]
|
||||
bytes = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
derive_more = { workspace = true, features = ["deref", "deref_mut", "display"] }
|
||||
futures-util = { workspace = true, features = ["io"] }
|
||||
thiserror = { workspace = true }
|
||||
|
||||
@ -40,12 +40,12 @@ pub struct Report<E: ReportableError> {
|
||||
|
||||
/// A [`Display`]-able indicating there was extra trailing input after parsing.
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "extra unparsed input")]
|
||||
#[display("extra unparsed input")]
|
||||
pub struct ExtraUnparsedInput;
|
||||
|
||||
/// A [`Display`]-able indicating an error occurred while parsing a certain type.
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing value of type `{}`", _0)]
|
||||
#[display("while parsing value of type `{}`", _0)]
|
||||
pub struct WhileParsingType(&'static str);
|
||||
|
||||
/// A convenience type alias for a [`Result`](std::result::Result) containing an error wrapped by a [`Report`].
|
||||
@ -70,7 +70,7 @@ pub struct ReportStack {
|
||||
|
||||
/// A null error stack which ignores all data attached to it.
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "")]
|
||||
#[display("")]
|
||||
pub struct NullReportStack;
|
||||
|
||||
/// A trait for error types which can be used in a [`Report`].
|
||||
@ -95,7 +95,7 @@ pub trait ReportableErrorStack: Display {
|
||||
//
|
||||
|
||||
#[derive(derive_more::Display)]
|
||||
#[display(fmt = "{message} at {location}")]
|
||||
#[display("{message} at {location}")]
|
||||
struct ReportEntry {
|
||||
message: Box<dyn Display + Send + Sync + 'static>,
|
||||
location: &'static Location<'static>,
|
||||
|
||||
@ -18,7 +18,7 @@ exclude.workspace = true
|
||||
bytes = { workspace = true }
|
||||
derive-where = { workspace = true }
|
||||
derive_builder = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
derive_more = { workspace = true, features = ["display", "from"] }
|
||||
downcast-rs = { workspace = true }
|
||||
dyn-clonable = { workspace = true }
|
||||
futures-util = { workspace = true, features = ["io"] }
|
||||
|
||||
@ -143,7 +143,7 @@ pub const COMPATIBLE_BRAND: FourCC = FourCC { value: *b"isom" };
|
||||
//
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "box data too large: {} > {}", _0, _1)]
|
||||
#[display("box data too large: {} > {}", _0, _1)]
|
||||
struct BoxDataTooLarge(u64, u64);
|
||||
|
||||
const MAX_FTYP_SIZE: u64 = 1024;
|
||||
|
||||
@ -77,23 +77,23 @@ pub trait __ParseResultExt: ResultExt + Sized {
|
||||
pub(crate) use self::__ParseResultExt as ParseResultExt;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "multiple `{}` boxes", _0)]
|
||||
#[display("multiple `{}` boxes", _0)]
|
||||
pub(crate) struct MultipleBoxes(pub(crate) BoxType);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing `{}` box", _0)]
|
||||
#[display("while parsing `{}` box", _0)]
|
||||
pub(crate) struct WhileParsingBox(pub(crate) BoxType);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing `{}` box field `{}`", _0, _1)]
|
||||
#[display("while parsing `{}` box field `{}`", _0, _1)]
|
||||
pub(crate) struct WhileParsingField<T>(pub(crate) BoxType, pub(crate) T);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing `{}` box child `{}`", _0, _1)]
|
||||
#[display("while parsing `{}` box child `{}`", _0, _1)]
|
||||
pub(crate) struct WhileParsingChild(pub(crate) BoxType, pub(crate) BoxType);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "where `{} = {}`", _0, _1)]
|
||||
#[display("where `{} = {}`", _0, _1)]
|
||||
pub(crate) struct WhereEq<T, U>(pub(crate) T, pub(crate) U);
|
||||
|
||||
impl ReportableError for ParseError {
|
||||
|
||||
@ -24,7 +24,7 @@ bitflags = { workspace = true }
|
||||
bitstream-io = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
derive_builder = { workspace = true }
|
||||
derive_more = { workspace = true }
|
||||
derive_more = { workspace = true, features = ["display"] }
|
||||
log = { workspace = true }
|
||||
mediasan-common = { path = "../common", version = "=0.5.3" }
|
||||
num-integer = { workspace = true }
|
||||
|
||||
@ -72,7 +72,7 @@ trait ReadSkip: Read + Skip {}
|
||||
type DynChunkReader<'a> = ChunkReader<dyn ReadSkip + 'a>;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "frame dimensions `{_0}`x`{_1}` do not match canvas dimensions `{_2}`x`{_3}`")]
|
||||
#[display("frame dimensions `{_0}`x`{_1}` do not match canvas dimensions `{_2}`x`{_3}`")]
|
||||
struct FrameDimensionsMismatch(NonZeroU16, NonZeroU16, NonZeroU32, NonZeroU32);
|
||||
|
||||
//
|
||||
|
||||
@ -26,7 +26,7 @@ pub struct CanonicalHuffmanTree<E: Endianness, S: Clone> {
|
||||
}
|
||||
|
||||
#[derive(Display)]
|
||||
#[display(fmt = "invalid lz77 prefix code `{_0}`")]
|
||||
#[display("invalid lz77 prefix code `{_0}`")]
|
||||
struct InvalidLz77PrefixCode(u16);
|
||||
|
||||
pub const LZ77_MAX_LEN: u16 = (LZ77_MAX_SYMBOL - 2) >> 1;
|
||||
|
||||
@ -58,19 +58,19 @@ pub(crate) trait ParseResultExt: ResultExt + Sized {
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "multiple `{}` chunks", _0)]
|
||||
#[display("multiple `{}` chunks", _0)]
|
||||
pub(crate) struct MultipleChunks(pub(crate) FourCC);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "expected `{}` chunk", _0)]
|
||||
#[display("expected `{}` chunk", _0)]
|
||||
pub(crate) struct ExpectedChunk(pub(crate) FourCC);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing `{}` chunk", _0)]
|
||||
#[display("while parsing `{}` chunk", _0)]
|
||||
pub(crate) struct WhileParsingChunk(pub(crate) FourCC);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing `{}` chunk field `{}`", _0, _1)]
|
||||
#[display("while parsing `{}` chunk field `{}`", _0, _1)]
|
||||
pub(crate) struct WhileParsingField<T>(pub(crate) FourCC, pub(crate) T);
|
||||
|
||||
impl ReportableError for ParseError {
|
||||
|
||||
@ -26,26 +26,26 @@ pub struct LosslessImage {
|
||||
|
||||
#[derive(Clone, Display, PartialEq, Eq)]
|
||||
enum Transform {
|
||||
#[display(fmt = "predictor transform: block size {block_size}")]
|
||||
#[display("predictor transform: block size {block_size}")]
|
||||
Predictor { block_size: u16, _image: EntropyCodedImage },
|
||||
#[display(fmt = "color transform: block size {block_size}")]
|
||||
#[display("color transform: block size {block_size}")]
|
||||
Color { block_size: u16, _image: EntropyCodedImage },
|
||||
#[display(fmt = "subtract green transform")]
|
||||
#[display("subtract green transform")]
|
||||
SubtractGreen,
|
||||
#[display(fmt = "color indexing transform: {} colors", "image.width")]
|
||||
#[display("color indexing transform: {} colors", "image.width")]
|
||||
ColorIndexing { image: EntropyCodedImage },
|
||||
}
|
||||
|
||||
#[repr(u8)]
|
||||
#[derive(Clone, Copy, Debug, Display, PartialEq, Eq, PartialOrd, Ord)]
|
||||
enum TransformType {
|
||||
#[display(fmt = "predictor")]
|
||||
#[display("predictor")]
|
||||
Predictor = 0b00,
|
||||
#[display(fmt = "color")]
|
||||
#[display("color")]
|
||||
Color = 0b01,
|
||||
#[display(fmt = "subtract green")]
|
||||
#[display("subtract green")]
|
||||
SubtractGreen = 0b10,
|
||||
#[display(fmt = "color indexing")]
|
||||
#[display("color indexing")]
|
||||
ColorIndexing = 0b11,
|
||||
}
|
||||
|
||||
@ -59,14 +59,14 @@ struct EntropyCodedImage {
|
||||
struct SpatiallyCodedImage;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display, PartialEq, Eq)]
|
||||
#[display(fmt = "distance {dist} length {len}")]
|
||||
#[display("distance {dist} length {len}")]
|
||||
struct BackReference {
|
||||
dist: NonZeroU32,
|
||||
len: NonZeroU32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, Display, PartialEq, Eq)]
|
||||
#[display(fmt = "({alpha}, {red}, {green}, {blue})")]
|
||||
#[display("({alpha}, {red}, {green}, {blue})")]
|
||||
struct Color {
|
||||
alpha: u8,
|
||||
red: u8,
|
||||
@ -81,9 +81,9 @@ struct ColorCache {
|
||||
|
||||
#[derive(Clone, Display, PartialEq, Eq)]
|
||||
enum MetaPrefixCodes {
|
||||
#[display(fmt = "single meta prefix code")]
|
||||
#[display("single meta prefix code")]
|
||||
Single,
|
||||
#[display(fmt = "multiple meta prefix codes: max code group {max_code_group}, block size {block_size}")]
|
||||
#[display("multiple meta prefix codes: max code group {max_code_group}, block size {block_size}")]
|
||||
Multiple {
|
||||
block_size: u16,
|
||||
max_code_group: u16,
|
||||
@ -124,39 +124,39 @@ struct DistancePrefixCode {
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "out-of-bounds color cache index `{_0}` >= `{_1}`")]
|
||||
#[display("out-of-bounds color cache index `{_0}` >= `{_1}`")]
|
||||
struct ColorCacheIndexOutOfBounds(u16, u16);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid back-reference distance `{_0}` at pixel `{_1}`")]
|
||||
#[display("invalid back-reference distance `{_0}` at pixel `{_1}`")]
|
||||
struct InvalidBackRefDistance(NonZeroU32, u32);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid back-reference length `{_0}` at pixel `{_1}` with image length `{_2}`")]
|
||||
#[display("invalid back-reference length `{_0}` at pixel `{_1}` with image length `{_2}`")]
|
||||
struct InvalidBackRefLength(NonZeroU32, u32, u32);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid code length repetition `{_0}` at `{_1}` with max symbols `{_2}`")]
|
||||
#[display("invalid code length repetition `{_0}` at `{_1}` with max symbols `{_2}`")]
|
||||
struct InvalidCodeLengthRepetition(u8, usize, u16);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid color cache size `{_0}`")]
|
||||
#[display("invalid color cache size `{_0}`")]
|
||||
struct InvalidColorCacheSize(u8);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid duplicate {_0} transform")]
|
||||
#[display("invalid duplicate {_0} transform")]
|
||||
struct InvalidDuplicateTransform(TransformType);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid predictor `{_0}`")]
|
||||
#[display("invalid predictor `{_0}`")]
|
||||
struct InvalidPredictor(u8);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid symbol count `{_0}` >= `{_1}`")]
|
||||
#[display("invalid symbol count `{_0}` >= `{_1}`")]
|
||||
struct InvalidSymbolCount(u16, u16);
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "while parsing {_0} transform")]
|
||||
#[display("while parsing {_0} transform")]
|
||||
struct WhileParsingTransform(TransformType);
|
||||
|
||||
//
|
||||
|
||||
@ -31,7 +31,7 @@ pub struct Vp8lChunk {
|
||||
//
|
||||
|
||||
#[derive(Clone, Copy, Debug, Display)]
|
||||
#[display(fmt = "invalid VP8L signature `0x{_0:x}` != `0x{}`", Vp8lChunk::SIGNATURE)]
|
||||
#[display("invalid VP8L signature `0x{_0:x}` != `0x{}`", Vp8lChunk::SIGNATURE)]
|
||||
struct InvalidSignature(u8);
|
||||
|
||||
//
|
||||
|
||||
Loading…
Reference in New Issue
Block a user