-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09f5fc4
commit cbcee11
Showing
12 changed files
with
133 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"pactup": patch | ||
--- | ||
|
||
update deps and fix --use-on-cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
fn main() { | ||
embed_resource::compile("manifest.rc", embed_resource::NONE); | ||
embed_resource::compile("manifest.rc", embed_resource::NONE) | ||
.manifest_optional() | ||
.unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
use miette::SourceOffset; | ||
#[derive(Debug, thiserror::Error, miette::Diagnostic)] | ||
#[error("malformed json\n{}", self.report())] | ||
pub struct DecodeError { | ||
cause: serde_json::Error, | ||
#[source_code] | ||
input: String, | ||
#[label("at this position")] | ||
location: SourceOffset, | ||
} | ||
#[derive(Debug, thiserror::Error, miette::Diagnostic)] | ||
#[error("")] | ||
pub struct ClonedError { | ||
message: String, | ||
#[source_code] | ||
input: String, | ||
#[label("{message}")] | ||
location: SourceOffset, | ||
} | ||
impl DecodeError { | ||
pub fn from_serde(input: impl Into<String>, cause: serde_json::Error) -> Self { | ||
let input = input.into(); | ||
let location = SourceOffset::from_location(&input, cause.line(), cause.column()); | ||
DecodeError { | ||
cause, | ||
input, | ||
location, | ||
} | ||
} | ||
pub fn report(&self) -> String { | ||
use colored::Colorize; | ||
let report = miette::Report::from(ClonedError { | ||
message: self.cause.to_string().italic().to_string(), | ||
input: self.input.clone(), | ||
location: self.location, | ||
}); | ||
let mut output = String::new(); | ||
for line in format!("{report:?}").lines().skip(1) { | ||
use std::fmt::Write; | ||
writeln!(&mut output, "{line}").unwrap(); | ||
} | ||
output.white().to_string() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters