From e68eea35fec6597cc8e000d0fcfdc031283a335c Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sun, 12 Jun 2022 16:40:51 +1000 Subject: [PATCH] Mark type `ManifestVisitor` as `pub(super)` Since mod `cretesio` is the only one need to have access to it. Signed-off-by: Jiahao XU --- src/drivers.rs | 1 - src/drivers/cratesio.rs | 2 +- src/drivers/visitor.rs | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/drivers.rs b/src/drivers.rs index 8c5a9724..8b8f362f 100644 --- a/src/drivers.rs +++ b/src/drivers.rs @@ -11,7 +11,6 @@ use version::find_version; mod vfs; mod visitor; -pub use visitor::*; /// Fetch a crate by name and version from github /// TODO: implement this diff --git a/src/drivers/cratesio.rs b/src/drivers/cratesio.rs index 861b49cd..28a157ca 100644 --- a/src/drivers/cratesio.rs +++ b/src/drivers/cratesio.rs @@ -6,7 +6,7 @@ use crates_io_api::AsyncClient; use log::debug; use url::Url; -use super::{find_version, ManifestVisitor}; +use super::{find_version, visitor::ManifestVisitor}; use crate::{helpers::*, BinstallError, Meta, TarBasedFmt}; /// Fetch a crate Cargo.toml by name and version from crates.io diff --git a/src/drivers/visitor.rs b/src/drivers/visitor.rs index 005dbace..850d7c39 100644 --- a/src/drivers/visitor.rs +++ b/src/drivers/visitor.rs @@ -12,7 +12,7 @@ use crate::{ }; #[derive(Debug)] -pub struct ManifestVisitor { +pub(super) struct ManifestVisitor { cargo_toml_content: Vec, /// manifest_dir_path is treated as the current dir. manifest_dir_path: PathBuf, @@ -31,7 +31,7 @@ impl ManifestVisitor { } /// Load binstall metadata using the extracted information stored in memory. - pub fn load_manifest(&self) -> Result, BinstallError> { + pub(super) fn load_manifest(&self) -> Result, BinstallError> { debug!("Loading manifest directly from extracted file"); // Load and parse manifest