mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 04:58:42 +00:00
Mark all internal types & fn as pub(crate)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
1c40848f51
commit
cc13a23b07
3 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ use tokio::{sync::mpsc, task::spawn_blocking};
|
|||
use super::{extracter::*, readable_rx::*, AutoAbortJoinHandle};
|
||||
use crate::{BinstallError, PkgFmt};
|
||||
|
||||
pub enum Content {
|
||||
pub(crate) enum Content {
|
||||
/// Data to write to file
|
||||
Data(Bytes),
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ use crate::{BinstallError, PkgFmt};
|
|||
/// Extract files from the specified source onto the specified path.
|
||||
///
|
||||
/// * `fmt` - must not be `PkgFmt::Bin` or `PkgFmt::Zip`.
|
||||
pub fn extract_compressed_from_readable(
|
||||
pub(crate) fn extract_compressed_from_readable(
|
||||
dat: impl Read,
|
||||
fmt: PkgFmt,
|
||||
path: &Path,
|
||||
|
@ -66,7 +66,7 @@ pub fn extract_compressed_from_readable(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn unzip(dat: File, dst: &Path) -> Result<(), BinstallError> {
|
||||
pub(crate) fn unzip(dat: File, dst: &Path) -> Result<(), BinstallError> {
|
||||
debug!("Decompressing from zip archive to `{dst:?}`");
|
||||
|
||||
let mut zip = ZipArchive::new(dat)?;
|
||||
|
|
|
@ -7,13 +7,13 @@ use tokio::sync::mpsc::Receiver;
|
|||
use super::async_file_writer::Content;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ReadableRx<'a> {
|
||||
pub(crate) struct ReadableRx<'a> {
|
||||
rx: &'a mut Receiver<Content>,
|
||||
bytes: Bytes,
|
||||
}
|
||||
|
||||
impl<'a> ReadableRx<'a> {
|
||||
pub fn new(rx: &'a mut Receiver<Content>) -> Self {
|
||||
pub(crate) fn new(rx: &'a mut Receiver<Content>) -> Self {
|
||||
Self {
|
||||
rx,
|
||||
bytes: Bytes::new(),
|
||||
|
|
Loading…
Add table
Reference in a new issue