Skip to content

Commit 6617599

Browse files
committed
Revert "treewide: Bump rust version to nightly-2023-12-28"
This reverts commit 4317d95a34046f9796330a67f05b8dca5554ffd7. Change-Id: Idc6e6952f2a3cd027f4c58082ac770571d3f1cbc Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7388 Tested-by: Buildkite CI Reviewed-by: Ron Hough <[email protected]>
1 parent 4bb6f5e commit 6617599

File tree

9 files changed

+38
-34
lines changed

9 files changed

+38
-34
lines changed

array2/src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
//! Internally, values are stored in a single continuous allocation row-first, alongside the length
2121
//! of the row.
2222
23-
#![feature(int_roundings)]
23+
#![feature(core_intrinsics, int_roundings)]
2424
use std::fmt::Debug;
25+
use std::intrinsics::unlikely;
2526
use std::ops::{Index, IndexMut};
2627
use std::usize;
2728

@@ -84,16 +85,11 @@ impl<T> Array2<T> {
8485
/// passed an empty vector or if the rows are a different size.
8586
#[inline]
8687
pub fn try_from_rows(rows: Vec<Vec<T>>) -> Result<Self> {
87-
#[cold]
88-
fn not_equal(x: usize, y: usize) -> bool {
89-
x != y
90-
}
91-
9288
let row_size = rows.first().ok_or(Error::Empty)?.len();
9389
let mut elems = Vec::with_capacity(row_size * rows.len());
9490

9591
for (row_index, row) in rows.into_iter().enumerate() {
96-
if not_equal(row.len(), row_size) {
92+
if unlikely(row.len() != row_size) {
9793
return Err(Error::InconsistentRowSize {
9894
row_index,
9995
row_size,
@@ -203,7 +199,9 @@ impl<T> Array2<T> {
203199
/// );
204200
/// ```
205201
#[inline]
206-
pub fn rows(&self) -> impl ExactSizeIterator<Item = &[T]> + DoubleEndedIterator + '_ {
202+
pub fn rows(
203+
&self,
204+
) -> impl Iterator<Item = &[T]> + ExactSizeIterator + DoubleEndedIterator + '_ {
207205
self.cells.chunks(self.row_size)
208206
}
209207

@@ -222,7 +220,7 @@ impl<T> Array2<T> {
222220
/// )
223221
/// ```
224222
#[inline]
225-
pub fn entries(&self) -> impl ExactSizeIterator<Item = ((usize, usize), &T)> + '_ {
223+
pub fn entries(&self) -> impl Iterator<Item = ((usize, usize), &T)> + ExactSizeIterator + '_ {
226224
self.cells.iter().enumerate().map(move |(i, v)| {
227225
let row = i.div_floor(self.row_size);
228226
let col = i % self.row_size;
@@ -245,7 +243,9 @@ impl<T> Array2<T> {
245243
/// assert_eq!(my_array2, Array2::from_rows(vec![vec![1, 3], vec![4, 6]]))
246244
/// ```
247245
#[inline]
248-
pub fn entries_mut(&mut self) -> impl ExactSizeIterator<Item = ((usize, usize), &mut T)> + '_ {
246+
pub fn entries_mut(
247+
&mut self,
248+
) -> impl Iterator<Item = ((usize, usize), &mut T)> + ExactSizeIterator + '_ {
249249
let row_size = self.row_size;
250250
self.cells.iter_mut().enumerate().map(move |(i, v)| {
251251
let row = i.div_floor(row_size);
@@ -270,7 +270,7 @@ impl<T> Array2<T> {
270270
/// )
271271
/// ```
272272
#[inline]
273-
pub fn into_entries(self) -> impl ExactSizeIterator<Item = ((usize, usize), T)> {
273+
pub fn into_entries(self) -> impl Iterator<Item = ((usize, usize), T)> + ExactSizeIterator {
274274
self.cells
275275
.into_vec()
276276
.into_iter()

nom-sql/src/sql_identifier.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ impl std::borrow::Borrow<str> for SqlIdentifier {
307307
}
308308
}
309309

310+
impl std::borrow::Borrow<[u8]> for SqlIdentifier {
311+
fn borrow(&self) -> &[u8] {
312+
self.as_ref()
313+
}
314+
}
315+
310316
impl PartialOrd for SqlIdentifier {
311317
#[inline]
312318
#[allow(clippy::non_canonical_partial_ord_impl)]

readyset-alloc/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
#![cfg_attr(test, feature(test))]
6060
#![cfg_attr(test, feature(custom_test_frameworks))]
6161
#![cfg_attr(test, test_runner(runner::run_env_conditional_tests))]
62-
#![allow(internal_features)]
6362
#![feature(core_intrinsics)]
6463

6564
#[macro_use]

readyset-clustertest/src/readyset_mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ async fn views_synchronize_between_deployments() {
15991599

16001600
// Eventually it should show up in adapter 1 too
16011601
eventually! {
1602-
adapter_1.as_mysql_conn().unwrap().query_drop("SELECT * FROM t1;").await.unwrap();
1602+
adapter_1.as_mysql_conn().unwrap().query_drop("SELECT * FROM t1;");
16031603
last_statement_destination(adapter_1.as_mysql_conn().unwrap()).await == QueryDestination::Readyset
16041604
}
16051605

readyset-mir/src/graph.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,12 @@ impl MirGraph {
378378
},
379379
// otherwise, just look up in the column set
380380
// Compare by name if there is no table
381-
_ => match if c.table.is_none() {
382-
self.columns(node).iter().position(|cc| cc.name == c.name)
383-
} else {
384-
self.columns(node).iter().position(|cc| cc == c)
381+
_ => match {
382+
if c.table.is_none() {
383+
self.columns(node).iter().position(|cc| cc.name == c.name)
384+
} else {
385+
self.columns(node).iter().position(|cc| cc == c)
386+
}
385387
} {
386388
Some(id) => Ok(id),
387389
None => err,

readyset-tracing/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//! [presampling](presampled) - sampling spans at creation time rather than when a subscriber would
1616
//! send them to a collector.
1717
18+
#![feature(core_intrinsics)]
1819
use std::fs::File;
1920
use std::path::{Path, PathBuf};
2021
use std::sync::Arc;

replicators/src/mysql_connector/snapshot.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl MySqlReplicator {
204204
let mut bad_tables = Vec::new();
205205
// Process `CREATE TABLE` statements
206206
for (db, table) in replicated_tables.iter() {
207-
let res = create_for_table(&mut tx, db, table, TableKind::BaseTable)
207+
match create_for_table(&mut tx, db, table, TableKind::BaseTable)
208208
.map_err(|e| e.into())
209209
.and_then(|create_table| {
210210
debug!(%create_table, "Extending recipe");
@@ -222,9 +222,8 @@ impl MySqlReplicator {
222222
changelist.with_schema_search_path(vec![db.clone().into()]),
223223
)
224224
})
225-
.await;
226-
227-
match res {
225+
.await
226+
{
228227
Ok(_) => {}
229228
Err(error) => {
230229
warn!(%error, "Error extending CREATE TABLE, table will not be used");
@@ -257,7 +256,7 @@ impl MySqlReplicator {
257256

258257
// Process `CREATE VIEW` statements
259258
for (db, view) in all_views.iter() {
260-
let res = create_for_table(&mut tx, db, view, TableKind::View)
259+
match create_for_table(&mut tx, db, view, TableKind::View)
261260
.map_err(|e| e.into())
262261
.and_then(|create_view| {
263262
db_schemas.extend_create_schema_for_view(
@@ -273,9 +272,8 @@ impl MySqlReplicator {
273272
changelist.with_schema_search_path(vec![db.clone().into()]),
274273
)
275274
})
276-
.await;
277-
278-
match res {
275+
.await
276+
{
279277
Ok(_) => {}
280278
Err(error) => {
281279
warn!(%view, %error, "Error extending CREATE VIEW, view will not be used");

replicators/src/postgres_connector/snapshot.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ impl<'a> PostgresReplicator<'a> {
774774
let mut tables = Vec::with_capacity(table_list.len());
775775
for table in table_list {
776776
let table_name = &table.name.clone().to_string();
777-
let res = table
777+
match table
778778
.get_table(get_transaction!(self))
779779
.and_then(|create_table| {
780780
future::ready(
@@ -809,9 +809,8 @@ impl<'a> PostgresReplicator<'a> {
809809
))
810810
.map_ok(|_| create_table)
811811
})
812-
.await;
813-
814-
match res {
812+
.await
813+
{
815814
Ok(create_table) => {
816815
tables.push(create_table);
817816
}
@@ -837,7 +836,7 @@ impl<'a> PostgresReplicator<'a> {
837836
let view_name = view.name.clone();
838837
let view_schema = view.schema.clone();
839838

840-
let res = view
839+
match view
841840
.get_create_view(get_transaction!(self))
842841
.map_err(|e| e.into())
843842
.and_then(|create_view| {
@@ -857,9 +856,8 @@ impl<'a> PostgresReplicator<'a> {
857856
.with_schema_search_path(vec![view_schema.clone().into()]),
858857
)
859858
})
860-
.await;
861-
862-
match res {
859+
.await
860+
{
863861
Ok(_) => {}
864862
Err(error) => {
865863
warn!(

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2023-12-28
1+
nightly-2023-11-09

0 commit comments

Comments
 (0)