This commit is contained in:
Scott Lamb
2024-08-19 07:57:06 -07:00
parent dad664c244
commit 140f625a80
10 changed files with 36 additions and 49 deletions

View File

@@ -87,7 +87,7 @@ fn tab_complete(
menu::Tree::new().with(|tree| {
for completion in completions {
let edit_view = edit_view.clone();
tree.add_leaf(&completion.clone(), move |siv| {
tree.add_leaf(completion.clone(), move |siv| {
edit_view.borrow_mut().set_content(&completion)(siv)
})
}

View File

@@ -951,7 +951,7 @@ impl FileBuilder {
}
let s = Segment::new(
db,
&row,
row,
rel_media_range_90k,
self.next_frame_num,
start_at_key,
@@ -1071,7 +1071,7 @@ impl FileBuilder {
// If the segment is > 4 GiB, the 32-bit trun data offsets are untrustworthy.
// We'd need multiple moof+mdat sequences to support large media segments properly.
if self.body.slices.len() > u32::max_value() as u64 {
if self.body.slices.len() > u64::from(u32::MAX) {
bail!(
OutOfRange,
msg(

View File

@@ -429,8 +429,8 @@ impl Service {
type_: db::StreamType,
) -> ResponseResult {
let (r, split) = {
let mut time = recording::Time::min_value()..recording::Time::max_value();
let mut split = recording::Duration(i64::max_value());
let mut time = recording::Time::MIN..recording::Time::MAX;
let mut split = recording::Duration(i64::MAX);
if let Some(q) = req.uri().query() {
for (key, value) in form_urlencoded::parse(q.as_bytes()) {
let (key, value) = (key.borrow(), value.borrow());

View File

@@ -56,7 +56,7 @@ impl Service {
}
fn get_signals(&self, req: &Request<hyper::Body>) -> ResponseResult {
let mut time = recording::Time::min_value()..recording::Time::max_value();
let mut time = recording::Time::MIN..recording::Time::MAX;
if let Some(q) = req.uri().query() {
for (key, value) in form_urlencoded::parse(q.as_bytes()) {
let (key, value) = (key.borrow(), value.borrow());

View File

@@ -117,7 +117,7 @@ impl Service {
// Add a segment for the relevant part of the recording, if any.
// Note all calculations here are in wall times / wall durations.
let end_time = s.end_time.unwrap_or(i64::max_value());
let end_time = s.end_time.unwrap_or(i64::MAX);
let wd = i64::from(r.wall_duration_90k);
if s.start_time <= cur_off + wd && cur_off < end_time {
let start = cmp::max(0, s.start_time - cur_off);