Skip to content

Commit

Permalink
more conversion from anyhow to eyre
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Jan 13, 2025
1 parent b02b0cf commit 224e748
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion braid-april-cal/flytrax-apriltags-calibration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
anyhow.workspace = true
eyre.workspace = true
base64.workspace = true
clap.workspace = true
image.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

use anyhow::Context;
use clap::Parser;
use eyre::{self as anyhow, Context};

#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use eyre as anyhow;
use std::io::Write;

// This is lightly modified from the version in braid-process-video.
Expand Down
2 changes: 1 addition & 1 deletion braid-april-cal/flytrax-apriltags-calibration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::{Path, PathBuf};

use anyhow::Context;
use braid_april_cal::*;
use eyre::{self as anyhow, Context};
use flytrax_io::read_csv_commented_header;
use machine_vision_formats::pixel_format::Mono8;
use opencv_ros_camera::NamedIntrinsicParameters;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use eyre as anyhow;
use machine_vision_formats::{pixel_format::RGBA8, ImageBuffer, ImageBufferRef, ImageData, Stride};

pub(crate) struct Frame {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{Context, Result};
use eyre::{Context, Result};

use flytrax_apriltags_calibration::{compute_extrinsics, ComputeExtrinsicsArgs};

Expand Down
2 changes: 1 addition & 1 deletion flytrax-csv-to-braidz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lazy_static.workspace = true
futures.workspace = true
tokio.workspace = true
tempfile.workspace = true
anyhow.workspace = true
eyre.workspace = true
image.workspace = true
opencv-ros-camera = { workspace = true, features = ["serde-serialize"] }

Expand Down
2 changes: 1 addition & 1 deletion flytrax-csv-to-braidz/src/bin/flytrax-csv-to-braidz.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[macro_use]
extern crate lazy_static;

use anyhow::Context;
use eyre::{self as anyhow, Context};
use tracing::info;

use flydra_types::{MiniArenaConfig, XYGridConfig};
Expand Down
1 change: 1 addition & 0 deletions flytrax-csv-to-braidz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{
path::{Path, PathBuf},
};

use eyre as anyhow;
use serde::{Deserialize, Serialize};
use tracing::info;

Expand Down
3 changes: 2 additions & 1 deletion flytrax-csv-to-braidz/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ async fn test_z_values_zero() {
}

#[test(tokio::test)]
async fn mini_arenas_with_apriltags() -> anyhow::Result<()> {
#[cfg(feature = "with_apriltags")]
async fn mini_arenas_with_apriltags() -> eyre::Result<()> {
const URL_BASE: &str = "https://strawlab-cdn.com/assets";

const CHECKERBOARD_CAL_FNAME: &str = "20230629-ob9-data/20230629_optobehav9_calibration.yaml";
Expand Down
2 changes: 1 addition & 1 deletion strand-cam/flytrax-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
anyhow.workspace = true
eyre.workspace = true
serde_yaml.workspace = true

strand-cam-csv-config-types = { path = "../../strand-cam-csv-config-types" }
2 changes: 1 addition & 1 deletion strand-cam/flytrax-io/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::io::BufRead;

use anyhow::Result;
use eyre::{self as anyhow, Result};

use strand_cam_csv_config_types::FullCfgFview2_0_26;

Expand Down

0 comments on commit 224e748

Please sign in to comment.