From 54dba51a082cf67b4e91ef29c50d4161c7072878 Mon Sep 17 00:00:00 2001 From: Waleed Khan Date: Mon, 10 Jul 2023 18:17:00 +0300 Subject: [PATCH] docs: warn about missing docs for `jj-lib` crate --- lib/src/backend.rs | 2 ++ lib/src/commit.rs | 2 ++ lib/src/commit_builder.rs | 2 ++ lib/src/conflicts.rs | 2 ++ lib/src/dag_walk.rs | 2 ++ lib/src/default_index_store.rs | 2 ++ lib/src/default_revset_engine.rs | 2 ++ lib/src/default_revset_graph_iterator.rs | 2 ++ lib/src/default_submodule_store.rs | 2 ++ lib/src/diff.rs | 2 ++ lib/src/file_util.rs | 2 ++ lib/src/files.rs | 2 ++ lib/src/git.rs | 2 ++ lib/src/git_backend.rs | 2 ++ lib/src/gitignore.rs | 2 ++ lib/src/hex_util.rs | 3 +++ lib/src/id_prefix.rs | 2 ++ lib/src/index.rs | 2 ++ lib/src/lib.rs | 3 ++- lib/src/local_backend.rs | 2 ++ lib/src/lock.rs | 2 ++ lib/src/lock/unix.rs | 2 ++ lib/src/matchers.rs | 2 +- lib/src/merge.rs | 2 ++ lib/src/nightly_shims.rs | 2 ++ lib/src/op_heads_store.rs | 2 ++ lib/src/op_store.rs | 2 ++ lib/src/operation.rs | 2 ++ lib/src/protos/mod.rs | 2 ++ lib/src/refs.rs | 2 ++ lib/src/repo.rs | 2 ++ lib/src/repo_path.rs | 2 ++ lib/src/revset.rs | 2 ++ lib/src/rewrite.rs | 2 ++ lib/src/settings.rs | 2 ++ lib/src/simple_op_heads_store.rs | 2 ++ lib/src/simple_op_store.rs | 2 ++ lib/src/stacked_table.rs | 2 ++ lib/src/store.rs | 2 ++ lib/src/submodule_store.rs | 2 ++ lib/src/transaction.rs | 2 ++ lib/src/tree.rs | 2 ++ lib/src/tree_builder.rs | 2 ++ lib/src/view.rs | 2 ++ lib/src/working_copy.rs | 2 ++ lib/src/workspace.rs | 2 ++ 46 files changed, 92 insertions(+), 2 deletions(-) diff --git a/lib/src/backend.rs b/lib/src/backend.rs index 7292d6904..3aa888db7 100644 --- a/lib/src/backend.rs +++ b/lib/src/backend.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::any::Any; use std::collections::BTreeMap; use std::fmt::{Debug, Error, Formatter}; diff --git a/lib/src/commit.rs b/lib/src/commit.rs index 6decf6f39..4922c7cab 100644 --- a/lib/src/commit.rs +++ b/lib/src/commit.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::cmp::Ordering; use std::fmt::{Debug, Error, Formatter}; use std::hash::{Hash, Hasher}; diff --git a/lib/src/commit_builder.rs b/lib/src/commit_builder.rs index ed6dc1e49..ef1f804dc 100644 --- a/lib/src/commit_builder.rs +++ b/lib/src/commit_builder.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::sync::Arc; use crate::backend::{self, BackendResult, ChangeId, CommitId, Signature, TreeId}; diff --git a/lib/src/conflicts.rs b/lib/src/conflicts.rs index c1b29362b..73d23e020 100644 --- a/lib/src/conflicts.rs +++ b/lib/src/conflicts.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::hash::Hash; use std::io::Write; diff --git a/lib/src/dag_walk.rs b/lib/src/dag_walk.rs index f85c17c99..27f435b7d 100644 --- a/lib/src/dag_walk.rs +++ b/lib/src/dag_walk.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{BinaryHeap, HashMap, HashSet}; use std::hash::Hash; use std::{iter, mem}; diff --git a/lib/src/default_index_store.rs b/lib/src/default_index_store.rs index c0ec7796c..57960e824 100644 --- a/lib/src/default_index_store.rs +++ b/lib/src/default_index_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::any::Any; use std::cmp::{max, min, Ordering, Reverse}; use std::collections::{BTreeMap, BTreeSet, BinaryHeap, Bound, HashMap, HashSet}; diff --git a/lib/src/default_revset_engine.rs b/lib/src/default_revset_engine.rs index 961fee3b2..c57281cac 100644 --- a/lib/src/default_revset_engine.rs +++ b/lib/src/default_revset_engine.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::cmp::{Ordering, Reverse}; use std::collections::{BinaryHeap, HashSet}; use std::fmt; diff --git a/lib/src/default_revset_graph_iterator.rs b/lib/src/default_revset_graph_iterator.rs index 0bc8f992a..5fad16d76 100644 --- a/lib/src/default_revset_graph_iterator.rs +++ b/lib/src/default_revset_graph_iterator.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::cmp::min; use std::collections::{BTreeMap, HashSet}; diff --git a/lib/src/default_submodule_store.rs b/lib/src/default_submodule_store.rs index 243c22308..d44f2d776 100644 --- a/lib/src/default_submodule_store.rs +++ b/lib/src/default_submodule_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::path::{Path, PathBuf}; use crate::submodule_store::SubmoduleStore; diff --git a/lib/src/diff.rs b/lib/src/diff.rs index 9e3e62f30..852582983 100644 --- a/lib/src/diff.rs +++ b/lib/src/diff.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::cmp::{max, min, Ordering}; use std::collections::{BTreeMap, HashMap}; use std::fmt::{Debug, Formatter}; diff --git a/lib/src/file_util.rs b/lib/src/file_util.rs index 1707e7caa..56cdbd9b5 100644 --- a/lib/src/file_util.rs +++ b/lib/src/file_util.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fs::File; use std::path::{Component, Path, PathBuf}; use std::{io, iter}; diff --git a/lib/src/files.rs b/lib/src/files.rs index d053d2164..56d369c14 100644 --- a/lib/src/files.rs +++ b/lib/src/files.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::VecDeque; use std::fmt::{Debug, Error, Formatter}; use std::ops::Range; diff --git a/lib/src/git.rs b/lib/src/git.rs index 167ef8bcf..6aba692ee 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{BTreeMap, HashMap, HashSet}; use std::default::Default; use std::io::Read; diff --git a/lib/src/git_backend.rs b/lib/src/git_backend.rs index e1607d75f..1f1c07624 100644 --- a/lib/src/git_backend.rs +++ b/lib/src/git_backend.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::any::Any; use std::fmt::{Debug, Error, Formatter}; use std::io::{Cursor, Read}; diff --git a/lib/src/gitignore.rs b/lib/src/gitignore.rs index e6808cb8e..c2f5496ad 100644 --- a/lib/src/gitignore.rs +++ b/lib/src/gitignore.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fs::File; use std::io::Read; use std::path::PathBuf; diff --git a/lib/src/hex_util.rs b/lib/src/hex_util.rs index 2c59db3b7..1801b09a9 100644 --- a/lib/src/hex_util.rs +++ b/lib/src/hex_util.rs @@ -11,6 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + +#![allow(missing_docs)] + fn to_reverse_hex_digit(b: u8) -> Option { let value = match b { b'0'..=b'9' => b - b'0', diff --git a/lib/src/id_prefix.rs b/lib/src/id_prefix.rs index b8b5bc28e..17042d0d8 100644 --- a/lib/src/id_prefix.rs +++ b/lib/src/id_prefix.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::iter; use std::marker::PhantomData; use std::rc::Rc; diff --git a/lib/src/index.rs b/lib/src/index.rs index 0e85432d4..8bc6023eb 100644 --- a/lib/src/index.rs +++ b/lib/src/index.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::any::Any; use std::fmt::Debug; use std::sync::Arc; diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 06eacb94a..c089c7bc8 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -12,9 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![deny(unused_must_use)] //! Jujutsu version control system. +#![warn(missing_docs)] +#![deny(unused_must_use)] #[macro_use] mod content_hash; diff --git a/lib/src/local_backend.rs b/lib/src/local_backend.rs index 6170d7f5c..e9151451d 100644 --- a/lib/src/local_backend.rs +++ b/lib/src/local_backend.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::any::Any; use std::fmt::Debug; use std::fs; diff --git a/lib/src/lock.rs b/lib/src/lock.rs index 89563d796..440387d1b 100644 --- a/lib/src/lock.rs +++ b/lib/src/lock.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + #[cfg_attr(unix, path = "lock/unix.rs")] #[cfg_attr(not(unix), path = "lock/fallback.rs")] mod platform; diff --git a/lib/src/lock/unix.rs b/lib/src/lock/unix.rs index 6ed29278a..cf77d12cc 100644 --- a/lib/src/lock/unix.rs +++ b/lib/src/lock/unix.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fs::File; use std::path::PathBuf; diff --git a/lib/src/matchers.rs b/lib/src/matchers.rs index 2c1b6dfdb..f61cafded 100644 --- a/lib/src/matchers.rs +++ b/lib/src/matchers.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#![allow(dead_code)] +#![allow(dead_code, missing_docs)] use std::collections::{HashMap, HashSet}; use std::iter; diff --git a/lib/src/merge.rs b/lib/src/merge.rs index 12b1a39e0..b3deeefec 100644 --- a/lib/src/merge.rs +++ b/lib/src/merge.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::HashMap; use std::hash::Hash; diff --git a/lib/src/nightly_shims.rs b/lib/src/nightly_shims.rs index 98f0cd969..0b2d62a9f 100644 --- a/lib/src/nightly_shims.rs +++ b/lib/src/nightly_shims.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + #[cfg(feature = "map_first_last")] pub trait BTreeMapExt { fn first_key(&self) -> Option<&K>; diff --git a/lib/src/op_heads_store.rs b/lib/src/op_heads_store.rs index 88f5d966e..46f10b65b 100644 --- a/lib/src/op_heads_store.rs +++ b/lib/src/op_heads_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::HashSet; use std::fmt::Debug; use std::sync::Arc; diff --git a/lib/src/op_store.rs b/lib/src/op_store.rs index 3019cdadc..ae70ac32e 100644 --- a/lib/src/op_store.rs +++ b/lib/src/op_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{BTreeMap, HashMap, HashSet}; use std::fmt::{Debug, Error, Formatter}; use std::slice; diff --git a/lib/src/operation.rs b/lib/src/operation.rs index 990090d68..5b844f3ca 100644 --- a/lib/src/operation.rs +++ b/lib/src/operation.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::cmp::Ordering; use std::collections::HashSet; use std::fmt::{Debug, Error, Formatter}; diff --git a/lib/src/protos/mod.rs b/lib/src/protos/mod.rs index 981d17960..7ab70ac32 100644 --- a/lib/src/protos/mod.rs +++ b/lib/src/protos/mod.rs @@ -1,3 +1,5 @@ +#![allow(missing_docs)] + pub mod git_store { include!("git_store.rs"); } diff --git a/lib/src/refs.rs b/lib/src/refs.rs index 107a3143c..990655955 100644 --- a/lib/src/refs.rs +++ b/lib/src/refs.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use crate::backend::CommitId; use crate::index::Index; use crate::merge::trivial_merge; diff --git a/lib/src/repo.rs b/lib/src/repo.rs index e1703167e..2d17176f7 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{HashMap, HashSet}; use std::fmt::{Debug, Formatter}; use std::fs; diff --git a/lib/src/repo_path.rs b/lib/src/repo_path.rs index 157b36e76..48033a828 100644 --- a/lib/src/repo_path.rs +++ b/lib/src/repo_path.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fmt::{Debug, Error, Formatter}; use std::path::{Component, Path, PathBuf}; diff --git a/lib/src/revset.rs b/lib/src/revset.rs index 8387a929d..dc3918dfc 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::HashMap; use std::convert::Infallible; use std::ops::Range; diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs index 04393fb11..d2a297665 100644 --- a/lib/src/rewrite.rs +++ b/lib/src/rewrite.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{HashMap, HashSet}; use std::sync::Arc; diff --git a/lib/src/settings.rs b/lib/src/settings.rs index e10b5a753..2b24e502b 100644 --- a/lib/src/settings.rs +++ b/lib/src/settings.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::path::Path; use std::sync::{Arc, Mutex}; diff --git a/lib/src/simple_op_heads_store.rs b/lib/src/simple_op_heads_store.rs index 834e2f2eb..98df310ac 100644 --- a/lib/src/simple_op_heads_store.rs +++ b/lib/src/simple_op_heads_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fmt::{Debug, Formatter}; use std::fs; use std::path::{Path, PathBuf}; diff --git a/lib/src/simple_op_store.rs b/lib/src/simple_op_store.rs index f10f82790..d55fecaf4 100644 --- a/lib/src/simple_op_store.rs +++ b/lib/src/simple_op_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::BTreeMap; use std::fmt::Debug; use std::fs; diff --git a/lib/src/stacked_table.rs b/lib/src/stacked_table.rs index e9b61000c..c293421d0 100644 --- a/lib/src/stacked_table.rs +++ b/lib/src/stacked_table.rs @@ -18,6 +18,8 @@ //! a parent file, and the parent may have its own parent, and so on. The child //! file then represents the union of the entries. +#![allow(missing_docs)] + use std::cmp::Ordering; use std::collections::{BTreeMap, HashMap}; use std::fs::File; diff --git a/lib/src/store.rs b/lib/src/store.rs index b3bd98b18..e73b1fbe3 100644 --- a/lib/src/store.rs +++ b/lib/src/store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::any::Any; use std::collections::HashMap; use std::io::Read; diff --git a/lib/src/submodule_store.rs b/lib/src/submodule_store.rs index 6b0359cbc..e3c188216 100644 --- a/lib/src/submodule_store.rs +++ b/lib/src/submodule_store.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fmt::Debug; pub trait SubmoduleStore: Send + Sync + Debug { diff --git a/lib/src/transaction.rs b/lib/src/transaction.rs index 59835b3f5..1888f326f 100644 --- a/lib/src/transaction.rs +++ b/lib/src/transaction.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::sync::Arc; use crate::backend::Timestamp; diff --git a/lib/src/tree.rs b/lib/src/tree.rs index b2d28bd87..b81993b79 100644 --- a/lib/src/tree.rs +++ b/lib/src/tree.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fmt::{Debug, Error, Formatter}; use std::hash::{Hash, Hasher}; use std::io::Read; diff --git a/lib/src/tree_builder.rs b/lib/src/tree_builder.rs index 956d84dd5..b03bbe489 100644 --- a/lib/src/tree_builder.rs +++ b/lib/src/tree_builder.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::BTreeMap; use std::sync::Arc; diff --git a/lib/src/view.rs b/lib/src/view.rs index ef3726e20..f49d16b16 100644 --- a/lib/src/view.rs +++ b/lib/src/view.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{BTreeMap, HashMap, HashSet}; use std::fmt; diff --git a/lib/src/working_copy.rs b/lib/src/working_copy.rs index bfa10e765..0671f49e5 100644 --- a/lib/src/working_copy.rs +++ b/lib/src/working_copy.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::collections::{BTreeMap, HashSet}; use std::ffi::OsString; use std::fs; diff --git a/lib/src/workspace.rs b/lib/src/workspace.rs index e3dcc6398..197cc4c45 100644 --- a/lib/src/workspace.rs +++ b/lib/src/workspace.rs @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![allow(missing_docs)] + use std::fs::File; use std::io::{self, Read, Write}; use std::path::{Path, PathBuf};