Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete/deprecated since 0.2.0 #357

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions lib/src/archive/entry/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ impl WriteOption {
/// ```
#[inline]
pub const fn builder() -> WriteOptionBuilder {
#[allow(deprecated)]
WriteOptionBuilder::new()
}

Expand Down Expand Up @@ -199,7 +198,6 @@ pub struct WriteOptionBuilder {

impl Default for WriteOptionBuilder {
fn default() -> Self {
#[allow(deprecated)]
Self::new()
}
}
Expand All @@ -219,8 +217,7 @@ impl From<WriteOption> for WriteOptionBuilder {
}

impl WriteOptionBuilder {
#[deprecated(since = "0.2.0", note = "Use WriteOption::builder instead.")]
pub const fn new() -> Self {
const fn new() -> Self {
Self {
compression: Compression::No,
compression_level: CompressionLevel::DEFAULT,
Expand Down Expand Up @@ -315,7 +312,6 @@ impl ReadOption {
/// ```
#[inline]
pub const fn builder() -> ReadOptionBuilder {
#[allow(deprecated)]
ReadOptionBuilder::new()
}

Expand Down Expand Up @@ -354,8 +350,7 @@ impl From<ReadOption> for ReadOptionBuilder {
}

impl ReadOptionBuilder {
#[deprecated(since = "0.2.0", note = "Use ReadOption::builder instead.")]
pub const fn new() -> Self {
const fn new() -> Self {
Self { password: None }
}

Expand Down
22 changes: 0 additions & 22 deletions lib/src/archive/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,6 @@ impl<R: Read> Archive<R> {
Ok(Some(ChunkEntry(chunks)))
}

/// Reads the next entry from the archive.
///
/// # Returns
///
/// An `io::Result` containing an `Option<ReadEntry>`. Returns `Ok(None)` if there are no more entries to read.
///
/// # Errors
///
/// Returns an error if an I/O error occurs while reading from the archive.
#[deprecated(since = "0.2.0")]
#[inline]
pub fn read(&mut self) -> io::Result<Option<RegularEntry>> {
loop {
let entry = self.read_entry()?;
return match entry {
Some(EntryContainer::Regular(entry)) => Ok(Some(entry)),
Some(EntryContainer::Solid(_)) => continue,
None => Ok(None),
};
}
}

/// Reads the next entry from the archive.
///
/// # Returns
Expand Down