Reduce debug verbosity
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Prevent binary buffers inflating the log output.
This commit is contained in:
parent
031c03480d
commit
4c6ad1aaed
2 changed files with 35 additions and 2 deletions
|
@ -468,7 +468,7 @@ pub(crate) async fn import_from_nxm(state: ActionState, uri: String) -> Result<M
|
|||
import_mod(state, Some((nexus, file_info.version)), data).await
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(state))]
|
||||
#[tracing::instrument(skip(state, data), fields(data = data.len()))]
|
||||
pub(crate) async fn import_mod(
|
||||
state: ActionState,
|
||||
nexus: Option<(NexusInfo, String)>,
|
||||
|
|
|
@ -95,7 +95,7 @@ impl From<NexusMod> for NexusInfo {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Data, Debug, Lens)]
|
||||
#[derive(Clone, Data, Lens)]
|
||||
pub(crate) struct ModInfo {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
|
@ -118,6 +118,39 @@ pub(crate) struct ModInfo {
|
|||
pub nexus: Option<NexusInfo>,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for ModInfo {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("ModInfo")
|
||||
.field("id", &self.id)
|
||||
.field("name", &self.name)
|
||||
.field("summary", &self.summary)
|
||||
.field(
|
||||
"description",
|
||||
&(match &self.description {
|
||||
Some(desc) => format!("Some(String[0..{}])", desc.len()),
|
||||
None => "None".to_string(),
|
||||
}),
|
||||
)
|
||||
.field("categories", &self.categories)
|
||||
.field("author", &self.author)
|
||||
.field(
|
||||
"image",
|
||||
&(match &self.image {
|
||||
Some(image) => format!("Some(ImageBuf[{}x{}])", image.width(), image.height()),
|
||||
None => "None".to_string(),
|
||||
}),
|
||||
)
|
||||
.field("version", &self.version)
|
||||
.field("enabled", &self.enabled)
|
||||
.field("packages", &format!("Vec[0..{}]", self.packages.len()))
|
||||
.field("resources", &self.resources)
|
||||
.field("depends", &self.depends)
|
||||
.field("bundled", &self.bundled)
|
||||
.field("nexus", &self.nexus)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl ModInfo {
|
||||
pub fn new(
|
||||
cfg: ModConfig,
|
||||
|
|
Loading…
Add table
Reference in a new issue