Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[resolver]
incompatible-rust-versions = "fallback"

[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

Expand Down
14 changes: 7 additions & 7 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
customManagers: [
{
customType: 'regex',
fileMatch: [
'^rust-toolchain\\.toml$',
'Cargo.toml$',
'clippy.toml$',
'\\.clippy.toml$',
'^\\.github/workflows/ci.yml$',
'^\\.github/workflows/rust-next.yml$',
managerFilePatterns: [
'/^rust-toolchain\\.toml$/',
'/Cargo.toml$/',
'/clippy.toml$/',
'/\\.clippy.toml$/',
'/^\\.github/workflows/ci.yml$/',
'/^\\.github/workflows/rust-next.yml$/',
],
matchStrings: [
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
run: cargo hack test --each-feature --workspace
msrv:
name: "Check MSRV"
runs-on: ubuntu-latest
Expand All @@ -68,7 +68,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Default features
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
run: cargo hack check --each-feature --locked --rust-version --ignore-private --workspace --all-targets --keep-going
lockfile:
runs-on: ubuntu-latest
steps:
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --workspace --all-features --no-deps --document-private-items
run: cargo doc --workspace --all-features --no-deps --document-private-items --keep-going
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
sarif_file: clippy-results.sarif
wait-for-processing: true
- name: Report status
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
run: cargo clippy --workspace --all-features --all-targets --keep-going -- -D warnings --allow deprecated
coverage:
name: Coverage
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
run: cargo hack test --each-feature --workspace
latest:
name: "Check latest dependencies"
runs-on: ubuntu-latest
Expand All @@ -66,4 +66,4 @@ jobs:
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
run: cargo hack test --each-feature --workspace
15 changes: 4 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
default_install_hook_types: ["pre-commit", "commit-msg"]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-yaml
stages: [commit]
- id: check-json
stages: [commit]
- id: check-toml
stages: [commit]
- id: check-merge-conflict
stages: [commit]
- id: check-case-conflict
stages: [commit]
- id: detect-private-key
stages: [commit]
- repo: https://github.com/crate-ci/typos
rev: v1.16.20
rev: v1.32.0
hooks:
- id: typos
stages: [commit]
- repo: https://github.com/crate-ci/committed
rev: v1.0.20
rev: v1.1.7
hooks:
- id: committed
stages: [commit-msg]
21 changes: 11 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ include = [
"Cargo.lock",
"LICENSE*",
"README.md",
"benches/**/*",
"examples/**/*"
]

[workspace.lints.rust]
rust_2018_idioms = { level = "warn", priority = -1 }
unnameable_types = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_lifetimes = "warn"
Expand Down Expand Up @@ -61,7 +61,7 @@ lossy_float_literal = "warn"
macro_use_imports = "warn"
mem_forget = "warn"
mutex_integer = "warn"
needless_continue = "warn"
needless_continue = "allow"
needless_for_each = "warn"
negative_feature_names = "warn"
path_buf_push_overwrite = "warn"
Expand All @@ -86,6 +86,15 @@ verbose_file_reads = "warn"
wildcard_imports = "warn"
zero_sized_map_values = "warn"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
codegen-units = 1
lto = true
# debug = "line-tables-only" # requires Cargo 1.71

[package]
name = "git-dive"
description = "Dive into a file's history to find root cause"
Expand Down Expand Up @@ -152,13 +161,5 @@ automod = "1.0.14"
default = ["vendored-libgit2"]
vendored-libgit2 = ["git2/vendored-libgit2"]

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
codegen-units = 1
lto = true

[lints]
workspace = true
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ allow = [
"ISC",
"BSD-2-Clause",
"OpenSSL",
"Zlib",
]
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
Expand Down
6 changes: 3 additions & 3 deletions src/assets/lazy_theme_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use syntect::highlighting::{Theme, ThemeSet};
/// Same structure as a [`syntect::highlighting::ThemeSet`] but with themes
/// stored in raw serialized form, and deserialized on demand.
#[derive(Debug, Default, Serialize, Deserialize)]
pub struct LazyThemeSet {
pub(crate) struct LazyThemeSet {
/// This is a [`BTreeMap`] because that's what [`syntect::highlighting::ThemeSet`] uses
themes: BTreeMap<String, LazyTheme>,
}
Expand All @@ -30,7 +30,7 @@ struct LazyTheme {

impl LazyThemeSet {
/// Lazily load the given theme
pub fn get(&self, name: &str) -> Option<&Theme> {
pub(crate) fn get(&self, name: &str) -> Option<&Theme> {
self.themes.get(name).and_then(|lazy_theme| {
lazy_theme
.deserialized
Expand All @@ -40,7 +40,7 @@ impl LazyThemeSet {
}

/// Returns the name of all themes.
pub fn themes(&self) -> impl Iterator<Item = &str> {
pub(crate) fn themes(&self) -> impl Iterator<Item = &str> {
self.themes.keys().map(|name| name.as_ref())
}
}
Expand Down
Loading