Add loader and refactor errors (#917)
This commit adds a `Loader` type, which can be used to load multiple source strings. This was done to support the work on modules, but coincidentally enabled consolidating errors, since now `Config::run` can take a `&Loader`, and in the event of an error, return and `Error` that borrows from loaded strings. Multiple error types have been consolidated, and a bunch of ad-hoc error printing was removed.
This commit is contained in:
4
justfile
4
justfile
@@ -40,7 +40,7 @@ build:
|
||||
fmt:
|
||||
cargo +nightly fmt --all
|
||||
|
||||
watch +COMMAND='test':
|
||||
watch +COMMAND='ltest':
|
||||
cargo watch --clear --exec "{{COMMAND}}"
|
||||
|
||||
man:
|
||||
@@ -61,7 +61,7 @@ version := `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.tom
|
||||
changes:
|
||||
git log --pretty=format:%s >> CHANGELOG.md
|
||||
|
||||
check: clippy test forbid
|
||||
check: clippy fmt test forbid
|
||||
git diff --no-ext-diff --quiet --exit-code
|
||||
grep '^\[{{ version }}\]' CHANGELOG.md
|
||||
cargo +nightly generate-lockfile -Z minimal-versions
|
||||
|
||||
Reference in New Issue
Block a user