• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lpenz / ogle / 14023496525

23 Mar 2025 10:13PM UTC coverage: 78.702% (-2.0%) from 80.745%
14023496525

push

github

lpenz
term_wrapper using LazyLock

0 of 22 new or added lines in 2 files covered. (0.0%)

1 existing line in 1 file now uncovered.

388 of 493 relevant lines covered (78.7%)

2.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/term_wrapper.rs
1
// Copyright (C) 2025 Leandro Lisboa Penz <lpenz@lpenz.org>
2
// This file is subject to the terms and conditions defined in
3
// file 'LICENSE', which is part of this source code package.
4

5
use console::Term;
6
use std::io::Result;
7
use std::io::Write;
8
use std::sync::LazyLock;
9
use std::sync::Mutex;
10

NEW
11
static TERM: LazyLock<Mutex<Term>> = LazyLock::new(|| Mutex::new(Term::stdout()));
×
12

NEW
13
pub fn size_checked() -> Option<(u16, u16)> {
×
NEW
14
    TERM.lock().unwrap().size_checked()
×
NEW
15
}
×
16

NEW
17
pub fn move_cursor_up(n: usize) -> Result<()> {
×
NEW
18
    TERM.lock().unwrap().move_cursor_up(n)
×
NEW
19
}
×
20

NEW
21
pub fn clear_line() -> Result<()> {
×
NEW
22
    TERM.lock().unwrap().clear_line()
×
NEW
23
}
×
24

NEW
25
pub fn write_all(buf: &[u8]) -> Result<()> {
×
NEW
26
    TERM.lock().unwrap().write_all(buf)
×
NEW
27
}
×
28

NEW
29
pub fn flush() -> Result<()> {
×
NEW
30
    TERM.lock().unwrap().flush()
×
NEW
31
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc