mirror of
https://github.com/microsoft/edit.git
synced 2025-07-07 21:35:16 +00:00
Merge remote-tracking branch 'ms/main' into users/duhowett/hax/stdout
This commit is contained in:
commit
e3f7d3e271
4 changed files with 45 additions and 8 deletions
44
.github/workflows/pr.yml
vendored
Normal file
44
.github/workflows/pr.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
name: PR Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
steps:
|
||||
# The Windows runners have autocrlf enabled by default.
|
||||
- name: Disable git autocrlf
|
||||
run: git config --global core.autocrlf false
|
||||
if: matrix.os == 'windows-latest'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
||||
# Depends on `Cargo.lock` --> Has to be after checkout.
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Install Rust
|
||||
run: rustup toolchain install nightly --no-self-update --profile minimal --component rust-src,rustfmt,clippy
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Run tests
|
||||
run: cargo test --all-features --all-targets
|
||||
- name: Run clippy
|
||||
run: cargo clippy --all-features --all-targets -- --deny warnings
|
|
@ -12,7 +12,6 @@ name = "lib"
|
|||
harness = false
|
||||
|
||||
[features]
|
||||
debug-layout = []
|
||||
debug-latency = []
|
||||
|
||||
# We use `opt-level = "s"` as it significantly reduces binary size.
|
||||
|
|
|
@ -155,7 +155,7 @@ pub fn draw_statusbar(ctx: &mut Context, state: &mut State) {
|
|||
),
|
||||
);
|
||||
|
||||
#[cfg(any(feature = "debug-layout", feature = "debug-latency"))]
|
||||
#[cfg(feature = "debug-latency")]
|
||||
ctx.label(
|
||||
"stats",
|
||||
&arena_format!(ctx.arena(), "{}/{}", tb.logical_line_count(), tb.visual_line_count(),),
|
||||
|
|
|
@ -158,12 +158,6 @@ fn run() -> apperr::Result<()> {
|
|||
|
||||
draw(&mut ctx, &mut state);
|
||||
|
||||
#[cfg(feature = "debug-layout")]
|
||||
{
|
||||
drop(ctx);
|
||||
state.buffer.buffer.copy_from_str(&tui.debug_layout());
|
||||
}
|
||||
|
||||
#[cfg(feature = "debug-latency")]
|
||||
{
|
||||
passes += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue