From 1217e14fe2ca3efd75e2e8f7434ec81584005073 Mon Sep 17 00:00:00 2001 From: Hauke Strasdat Date: Sun, 16 Feb 2025 00:03:44 -0800 Subject: [PATCH] CARGO_PKG_README related fixes (#75) --- crates/sophus_autodiff/Cargo.toml | 2 +- crates/sophus_autodiff/src/lib.rs | 6 +++++- crates/sophus_geo/Cargo.toml | 2 +- crates/sophus_geo/src/lib.rs | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/sophus_autodiff/Cargo.toml b/crates/sophus_autodiff/Cargo.toml index 4c52cba..e7ef14d 100644 --- a/crates/sophus_autodiff/Cargo.toml +++ b/crates/sophus_autodiff/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "sophus - geometry for robotics and computer vision" name = "sophus_autodiff" -readme = "../README.md" +readme = "README.md" edition.workspace = true include.workspace = true diff --git a/crates/sophus_autodiff/src/lib.rs b/crates/sophus_autodiff/src/lib.rs index 1d2e45b..eccd277 100644 --- a/crates/sophus_autodiff/src/lib.rs +++ b/crates/sophus_autodiff/src/lib.rs @@ -2,9 +2,13 @@ #![deny(missing_docs)] #![no_std] #![allow(clippy::needless_range_loop)] -#![doc = include_str!(concat!("./", std::env!("CARGO_PKG_README")))] +#![doc = include_str!(concat!("../", std::env!("CARGO_PKG_README")))] #![cfg_attr(nightly, feature(doc_auto_cfg))] +#[doc = include_str!(concat!("../", core::env!("CARGO_PKG_README")))] +#[cfg(doctest)] +pub struct ReadmeDoctests; + #[cfg(feature = "std")] extern crate std; diff --git a/crates/sophus_geo/Cargo.toml b/crates/sophus_geo/Cargo.toml index 81114a7..fe8da2f 100644 --- a/crates/sophus_geo/Cargo.toml +++ b/crates/sophus_geo/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "sophus - geometry for robotics and computer vision" name = "sophus_geo" -readme = "../README.md" +readme = "README.md" edition.workspace = true include.workspace = true diff --git a/crates/sophus_geo/src/lib.rs b/crates/sophus_geo/src/lib.rs index 162e903..08faaa9 100644 --- a/crates/sophus_geo/src/lib.rs +++ b/crates/sophus_geo/src/lib.rs @@ -2,13 +2,13 @@ #![deny(missing_docs)] #![no_std] #![allow(clippy::needless_range_loop)] -#![doc = include_str!(concat!("./", std::env!("CARGO_PKG_README")))] +#![doc = include_str!(concat!("../", std::env!("CARGO_PKG_README")))] #![cfg_attr(nightly, feature(doc_auto_cfg))] #[cfg(feature = "std")] extern crate std; -#[doc = include_str!(concat!("./", core::env!("CARGO_PKG_README")))] +#[doc = include_str!(concat!("../", core::env!("CARGO_PKG_README")))] #[cfg(doctest)] pub struct ReadmeDoctests;