Skip to content

Commit

Permalink
Stop depending on clap 3 via cbindgen.
Browse files Browse the repository at this point in the history
cbindgen depends on clap by default so it can be used as a command-line
tool. This is totally superfluous when cbindgen is being used as a library (as
it is in mwalib).

Also fix a couple of clippy lints.
  • Loading branch information
cjordan committed Jun 8, 2023
1 parent e03dfe5 commit 53b5978
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Changes in each release are listed below.

## 0.16.3 09-Jun-2023

* Removed dependence on clap 3 via cbindgen

## 0.16.2 27-Apr-2023

* Updated min rust version to 1.60
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mwalib"
version = "0.16.2"
version = "0.16.3"
homepage = "https://github.com/MWATelescope/mwalib"
repository = "https://github.com/MWATelescope/mwalib"
readme = "README.md"
Expand Down Expand Up @@ -49,7 +49,7 @@ tempdir = "0.3.6"

[build-dependencies]
built = "0.5.0"
cbindgen = "0.24.0"
cbindgen = { version = "0.24.0", default_features = false }

[[example]]
name = "mwalib-data-dump"
Expand Down
4 changes: 2 additions & 2 deletions examples/mwalib-data-dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ fn dump_data<T: AsRef<std::path::Path>>(
let mut dump_file = File::create(dump_filename)?;
println!("Dumping data via mwalib...");
let context = CorrelatorContext::new(metafits, files)?;
let coarse_chan_array = context.coarse_chans.clone();
let timestep_array = context.timesteps.clone();
let coarse_chan_array = &context.coarse_chans;
let timestep_array = &context.timesteps;

println!("MWA version: {}", context.mwa_version);

Expand Down
2 changes: 1 addition & 1 deletion src/metafits_context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ impl fmt::Display for MetafitsContext {
lst = self.lst_deg,
ha = self.hour_angle_string,
grid = self.grid_name,
grid_n = self.grid_number.to_string(),
grid_n = self.grid_number,
calib = self.calibrator,
calsrc = self.calibrator_source,
n_ants = self.num_ants,
Expand Down

0 comments on commit 53b5978

Please sign in to comment.