Skip to content

Commit b83fe09

Browse files
committed
fix errors
1 parent ccde19c commit b83fe09

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

crates/core/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::time::Duration;
1010
fn main() {
1111
simple_logger::init_with_level(log::Level::Info).unwrap();
1212
let conf = make_configuration();
13-
let transport = HttpTransport::new(&conf);
13+
let transport = HttpTransport::new(conf.clone()).unwrap();
1414
let item = make_item(&conf);
1515
transport.send(item);
1616
transport.shutdown(Duration::from_secs(5));

crates/core/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ mod tests {
528528
assert_eq!(frame.lineno.unwrap(), 42);
529529
assert_eq!(frame.method.unwrap(), "hello");
530530
assert_eq!(frame.colno, None);
531-
assert_eq!(frame.filename, "core/src/types.rs");
531+
assert_eq!(frame.filename, "crates/core/src/types.rs");
532532
}
533533

534534
#[test]

crates/jvm_bare_agent/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ fn build_client() -> Rollbar {
3737
config = CONFIG.take();
3838
}
3939
Rollbar::new(config.expect("config should be initialized before building client"))
40+
.expect("rollbar could not be initialized")
4041
}
4142

4243
fn initialize_configuration() -> bool {

crates/jvm_bare_agent/src/rollbar.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ impl Rollbar {
1818
toml::from_str(&input).map_err(|err| err.to_string())
1919
}
2020

21-
pub fn new(conf: Configuration) -> Self {
22-
let transport = HttpTransport::new(&conf);
23-
Rollbar { conf, transport }
21+
pub fn new(conf: Configuration) -> Result<Self, Box<dyn std::error::Error>> {
22+
let transport = HttpTransport::new(conf.clone())?;
23+
Ok(Rollbar { conf, transport })
2424
}
2525

2626
pub fn send(&self, builder: DataBuilder) {

0 commit comments

Comments
 (0)