mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-19 03:25:38 +00:00
melib/utils/xdg: fix doc test compilation
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This commit is contained in:
parent
eb5d49c41a
commit
7888d8b2a5
6
Makefile
6
Makefile
@ -109,9 +109,13 @@ lint:
|
||||
@RUSTFLAGS='${RUSTFLAGS}' $(CARGO_BIN) clippy --no-deps --all-features --all --tests --examples --benches --bins
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
test: test-docs
|
||||
@RUSTFLAGS='${RUSTFLAGS}' ${CARGO_BIN} test ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --all --tests --examples --benches --bins
|
||||
|
||||
.PHONY: test-docs
|
||||
test-docs:
|
||||
@RUSTFLAGS='${RUSTFLAGS}' ${CARGO_BIN} test ${CARGO_ARGS} ${CARGO_COLOR}--target-dir="${CARGO_TARGET_DIR}" --all --doc
|
||||
|
||||
.PHONY: check-deps
|
||||
check-deps:
|
||||
@(if ! echo ${MIN_RUSTC}\\n`${CARGO_BIN} --version | grep ^cargo | cut -d ' ' -f 2` | sort -CV; then echo "rust version >= ${RED}${MIN_RUSTC}${ANSI_RESET} required, found: `which ${CARGO_BIN}` `${CARGO_BIN} --version | cut -d ' ' -f 2`" \
|
||||
|
@ -119,7 +119,7 @@ impl Ini {
|
||||
///
|
||||
/// # Example
|
||||
/// ```no_run
|
||||
/// use xdg_utils::query_default_app;
|
||||
/// use melib::utils::xdg::query_default_app;
|
||||
///
|
||||
/// // The crate author recommends firefox.
|
||||
/// assert_eq!(
|
||||
@ -330,8 +330,8 @@ pub fn desktop_file_to_command(
|
||||
/// <https://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-mime.in>
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// use xdg_utils::query_mime_info;
|
||||
/// ```no_run
|
||||
/// use melib::utils::xdg::query_mime_info;
|
||||
/// let result = query_mime_info("/bin/sh")
|
||||
/// .map_err(|_| ())
|
||||
/// .map(|bytes| String::from_utf8_lossy(&bytes).into_owned());
|
||||
|
Loading…
Reference in New Issue
Block a user