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

geo-engine / geoengine / 19736365813

27 Nov 2025 12:31PM UTC coverage: 89.009% (+0.1%) from 88.91%
19736365813

push

github

web-flow
fix: use fewer rustup deps for expression (#1098)

* fix: use fewer rustup deps for expression

* expression toolchain file in CLI

23 of 41 new or added lines in 4 files covered. (56.1%)

3 existing lines in 1 file now uncovered.

107525 of 120802 relevant lines covered (89.01%)

83477.4 hits per line

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

0.0
/services/src/cli/expression_toolchain_file.rs
1
use anyhow::Context;
2
use clap::Parser;
3
use geoengine_expression::write_minimal_toolchain_file;
4
use std::{fs::File, io::BufWriter, path::PathBuf};
5

6
const RUST_TOOLCHAIN_TOML: &str = std::include_str!("../../../rust-toolchain.toml");
7

8
/// Generates an rustup toolchain file for compiling expressions
9
#[derive(Debug, Default, Parser)]
10
pub struct ExpressionToolchainFile {
11
    /// Output file path. If not provided, outputs to STDOUT
12
    #[arg(long, default_value = "None")]
13
    file: Option<PathBuf>,
14
}
15

16
/// Checks the program's `STDERR` for successful startup
17
#[allow(clippy::print_stderr)]
NEW
18
pub async fn output_toolchain_file(params: ExpressionToolchainFile) -> Result<(), anyhow::Error> {
×
NEW
19
    match params.file {
×
NEW
20
        None => crate::util::spawn_blocking(move || {
×
NEW
21
            let stdout = std::io::stdout();
×
NEW
22
            let mut writer = BufWriter::new(stdout);
×
NEW
23
            write_minimal_toolchain_file(&mut writer, RUST_TOOLCHAIN_TOML)
×
NEW
24
        })
×
NEW
25
        .await?
×
NEW
26
        .context("Cannot write toolchain file"),
×
NEW
27
        Some(path) => crate::util::spawn_blocking(move || {
×
NEW
28
            let file = File::create(path)?;
×
NEW
29
            let mut writer = BufWriter::new(file);
×
NEW
30
            write_minimal_toolchain_file(&mut writer, RUST_TOOLCHAIN_TOML)
×
NEW
31
        })
×
NEW
32
        .await?
×
NEW
33
        .context("Cannot write toolchain file"),
×
34
    }
NEW
35
}
×
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