Skip to content

Commit fa01930

Browse files
committed
fix: Remove deprecated functions
Part of assert-rs#44. BREAKING CHANGE: Deprecated cargo path functions removed.
1 parent 7b6a960 commit fa01930

File tree

1 file changed

+0
-86
lines changed

1 file changed

+0
-86
lines changed

src/cargo.rs

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
use std::error::Error;
5252
use std::ffi;
5353
use std::fmt;
54-
use std::path;
5554
use std::process;
5655

5756
use escargot;
@@ -164,91 +163,6 @@ impl CommandCargoExt for process::Command {
164163
}
165164
}
166165

167-
/// Get the path to the crate's main binary.
168-
///
169-
/// Intended for caching the location, reducing the cargo overhead.
170-
///
171-
/// Note: only works if there one bin in the crate.
172-
///
173-
/// # Examples
174-
///
175-
/// ```rust
176-
/// use assert_cmd::prelude::*;
177-
///
178-
/// use std::process::Command;
179-
///
180-
/// let bin_under_test = assert_cmd::cargo::main_binary_path().unwrap();
181-
/// Command::new(&bin_under_test)
182-
/// .unwrap();
183-
/// ```
184-
#[deprecated(
185-
since = "0.9.1",
186-
note = "For caching, using escargot directly."
187-
)]
188-
pub fn main_binary_path() -> Result<path::PathBuf, CargoError> {
189-
let runner = escargot::CargoBuild::new()
190-
.current_release()
191-
.run()
192-
.map_err(CargoError::with_cause)?;
193-
Ok(runner.path().to_owned())
194-
}
195-
196-
/// Get the path to the specified binary of the current crate.
197-
///
198-
/// Intended for caching the location, reducing the cargo overhead.
199-
///
200-
/// # Examples
201-
///
202-
/// ```rust
203-
/// use assert_cmd::prelude::*;
204-
///
205-
/// use std::process::Command;
206-
///
207-
/// let bin_under_test = assert_cmd::cargo::cargo_bin_path("bin_fixture").unwrap();
208-
/// Command::new(&bin_under_test)
209-
/// .unwrap();
210-
/// ```
211-
#[deprecated(
212-
since = "0.9.1",
213-
note = "For caching, using escargot directly."
214-
)]
215-
pub fn cargo_bin_path<S: AsRef<ffi::OsStr>>(name: S) -> Result<path::PathBuf, CargoError> {
216-
let runner = escargot::CargoBuild::new()
217-
.bin(name)
218-
.current_release()
219-
.run()
220-
.map_err(CargoError::with_cause)?;
221-
Ok(runner.path().to_owned())
222-
}
223-
224-
/// Get the path to the specified example of the current crate.
225-
///
226-
/// Intended for caching the location, reducing the cargo overhead.
227-
///
228-
/// # Examples
229-
///
230-
/// ```rust
231-
/// use assert_cmd::prelude::*;
232-
///
233-
/// use std::process::Command;
234-
///
235-
/// let bin_under_test = assert_cmd::cargo::cargo_example_path("example_fixture").unwrap();
236-
/// Command::new(&bin_under_test)
237-
/// .unwrap();
238-
/// ```
239-
#[deprecated(
240-
since = "0.9.1",
241-
note = "For caching, using escargot directly."
242-
)]
243-
pub fn cargo_example_path<S: AsRef<ffi::OsStr>>(name: S) -> Result<path::PathBuf, CargoError> {
244-
let runner = escargot::CargoBuild::new()
245-
.example(name)
246-
.current_release()
247-
.run()
248-
.map_err(CargoError::with_cause)?;
249-
Ok(runner.path().to_owned())
250-
}
251-
252166
/// Error when finding crate binary.
253167
#[derive(Debug)]
254168
pub struct CargoError {

0 commit comments

Comments
 (0)