[go: up one dir, main page]

cxxbridge-cmd 1.0.164

C++ code generator for integrating `cxx` crate into a non-Cargo build.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::PathBuf;

#[derive(Debug)]
pub(crate) enum Output {
    Stdout,
    File(PathBuf),
}

impl Output {
    pub(crate) fn ends_with(&self, suffix: &str) -> bool {
        match self {
            Output::Stdout => false,
            Output::File(path) => path.to_string_lossy().ends_with(suffix),
        }
    }
}