mirror of
https://github.com/RGBCube/dix
synced 2025-07-26 19:27:45 +00:00
fix: fix typos
This commit is contained in:
parent
e6b8f7b3a7
commit
6271e97882
2 changed files with 15 additions and 17 deletions
|
@ -64,8 +64,7 @@ pub fn write_paths_diffln(
|
||||||
) -> Result<usize> {
|
) -> Result<usize> {
|
||||||
let mut connection = store::connect()?;
|
let mut connection = store::connect()?;
|
||||||
|
|
||||||
let paths_old =
|
let paths_old = connection.query_dependents(path_old).with_context(|| {
|
||||||
connection.query_depdendents(path_old).with_context(|| {
|
|
||||||
format!(
|
format!(
|
||||||
"failed to query dependencies of path '{path}'",
|
"failed to query dependencies of path '{path}'",
|
||||||
path = path_old.display()
|
path = path_old.display()
|
||||||
|
@ -77,8 +76,7 @@ pub fn write_paths_diffln(
|
||||||
count = paths_old.len(),
|
count = paths_old.len(),
|
||||||
);
|
);
|
||||||
|
|
||||||
let paths_new =
|
let paths_new = connection.query_dependents(path_new).with_context(|| {
|
||||||
connection.query_depdendents(path_new).with_context(|| {
|
|
||||||
format!(
|
format!(
|
||||||
"failed to query dependencies of path '{path}'",
|
"failed to query dependencies of path '{path}'",
|
||||||
path = path_new.display()
|
path = path_new.display()
|
||||||
|
|
|
@ -44,7 +44,7 @@ pub fn connect() -> Result<Connection> {
|
||||||
//
|
//
|
||||||
// We read a large part of the DB anyways in each query,
|
// We read a large part of the DB anyways in each query,
|
||||||
// so it makes sense to set aside a large region of memory-mapped
|
// so it makes sense to set aside a large region of memory-mapped
|
||||||
// I/O prevent incuring page faults which can be done using
|
// I/O prevent incurring page faults which can be done using
|
||||||
// `mmap_size`.
|
// `mmap_size`.
|
||||||
//
|
//
|
||||||
// This made a performance difference of about 500ms (but only
|
// This made a performance difference of about 500ms (but only
|
||||||
|
@ -94,7 +94,7 @@ fn path_to_canonical_string(path: &Path) -> Result<String> {
|
||||||
|
|
||||||
impl Connection {
|
impl Connection {
|
||||||
/// Gets the total closure size of the given store path by summing up the nar
|
/// Gets the total closure size of the given store path by summing up the nar
|
||||||
/// size of all depdendent derivations.
|
/// size of all dependent derivations.
|
||||||
pub fn query_closure_size(&mut self, path: &Path) -> Result<Size> {
|
pub fn query_closure_size(&mut self, path: &Path) -> Result<Size> {
|
||||||
const QUERY: &str = "
|
const QUERY: &str = "
|
||||||
WITH RECURSIVE
|
WITH RECURSIVE
|
||||||
|
@ -120,7 +120,7 @@ impl Connection {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gathers all derivations that the given profile path depends on.
|
/// Gathers all derivations that the given profile path depends on.
|
||||||
pub fn query_depdendents(
|
pub fn query_dependents(
|
||||||
&mut self,
|
&mut self,
|
||||||
path: &Path,
|
path: &Path,
|
||||||
) -> Result<Vec<(DerivationId, StorePath)>> {
|
) -> Result<Vec<(DerivationId, StorePath)>> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue