mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
dag: switch from bytes to minibytes
Summary: The APIs are compatible so the switch is straightforward. Reviewed By: DurhamG Differential Revision: D19818713 fbshipit-source-id: 504e9149567c90eb661804e0dad20580a401aa76
This commit is contained in:
parent
9e3920ca1c
commit
76ab726056
@ -5,13 +5,13 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
indexedlog = { path = "../indexedlog" }
|
||||
minibytes = { path = "../minibytes" }
|
||||
types = { path = "../types" }
|
||||
vlqencoding = { path = "../vlqencoding" }
|
||||
|
||||
anyhow = "1.0.20"
|
||||
bitflags = "1"
|
||||
byteorder = "1.2.7"
|
||||
bytes = { version = "0.5", features = ["serde"] }
|
||||
fs2 = "0.4.3"
|
||||
indexmap = "1.0.1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
@ -9,7 +9,7 @@
|
||||
//!
|
||||
//! Defines types around [`Id`].
|
||||
|
||||
pub use bytes::Bytes;
|
||||
pub use minibytes::Bytes;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
use std::ops;
|
||||
|
@ -51,7 +51,11 @@ pub(crate) fn render_string_with_order(
|
||||
let mut last_head = 0;
|
||||
for head in heads.iter() {
|
||||
id_map
|
||||
.assign_head(head.as_bytes().into(), &parents_by_name, Group::MASTER)
|
||||
.assign_head(
|
||||
head.as_bytes().to_vec().into(),
|
||||
&parents_by_name,
|
||||
Group::MASTER,
|
||||
)
|
||||
.expect("can assign head");
|
||||
let Id(head_id) = id_map.find_id_by_name(head.as_bytes()).unwrap().unwrap();
|
||||
last_head = head_id;
|
||||
|
Loading…
Reference in New Issue
Block a user