Trigger
This commit is contained in:
8
.github/workflows/build-rhel7.yml
vendored
8
.github/workflows/build-rhel7.yml
vendored
@@ -55,12 +55,12 @@ jobs:
|
||||
- run: ls -la /root
|
||||
- run: rustc --version
|
||||
- run: cargo --version
|
||||
- run: mkdir /build
|
||||
- run: yum install -y git
|
||||
- run: git clone https://github.com/paulscherrerinstitute/daqingest.git
|
||||
- run: mkdir /build
|
||||
- run: git clone --branch dev https://github.com/paulscherrerinstitute/daqbuffer.git
|
||||
working-directory: /build
|
||||
- run: git clone --branch dev https://github.com/paulscherrerinstitute/daqingest.git
|
||||
working-directory: /build
|
||||
- run: git checkout dev
|
||||
working-directory: /build/daqingest
|
||||
- run: cargo build
|
||||
working-directory: /build/daqingest
|
||||
|
||||
|
||||
@@ -3,10 +3,13 @@ members = ["log", "netfetch", "daqingest"]
|
||||
resolver = "2"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
opt-level = 2
|
||||
debug = 0
|
||||
overflow-checks = false
|
||||
debug-assertions = false
|
||||
lto = "thin"
|
||||
codegen-units = 64
|
||||
incremental = true
|
||||
|
||||
[patch.crates-io]
|
||||
thiserror = { git = "https://github.com/dominikwerder/thiserror.git" }
|
||||
|
||||
@@ -6,5 +6,6 @@ pub mod pool;
|
||||
pub mod schema;
|
||||
pub mod seriesbychannel;
|
||||
pub mod seriesid;
|
||||
pub mod testerr;
|
||||
|
||||
pub use tokio_postgres as postgres;
|
||||
|
||||
31
dbpg/src/testerr.rs
Normal file
31
dbpg/src/testerr.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
use err::thiserror;
|
||||
use err::ThisError;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct TestError {
|
||||
msg: String,
|
||||
}
|
||||
|
||||
impl fmt::Display for TestError {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "{}", self.msg)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for TestError {}
|
||||
|
||||
#[derive(Debug, ThisError)]
|
||||
enum Error {
|
||||
Postgres(#[from] tokio_postgres::Error),
|
||||
Dummy(#[from] TestError),
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn err_msg_01() {
|
||||
let err: Error = TestError {
|
||||
msg: "some-error".into(),
|
||||
}
|
||||
.into();
|
||||
assert_eq!(err.to_string(), "Error::Dummy(some-error)")
|
||||
}
|
||||
@@ -6,6 +6,6 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
thiserror = "1.0.47"
|
||||
thiserror = "1.0.41"
|
||||
log = { path = "../log" }
|
||||
taskrun = { path = "../../daqbuffer/crates/taskrun" }
|
||||
|
||||
Reference in New Issue
Block a user