Skip to content

Commit 4f9688f

Browse files
committed
Removed some FIXME debugs
1 parent bfdf1a4 commit 4f9688f

8 files changed

Lines changed: 2 additions & 25 deletions

File tree

src/crypto/attrs/flattened_encrypted_attributes.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ use itertools::Itertools;
1212

1313
use super::FlattenedProtectedAttributes;
1414

15-
// TODO: Move this elsewhere
1615
/// Represents a set of encrypted records that have not yet been normalized into an output type.
17-
// TODO: Remove the Debug derive
18-
#[derive(Debug)]
1916
pub(crate) struct FlattenedEncryptedAttributes {
2017
attrs: Vec<EncryptedRecord>,
2118
}
@@ -31,7 +28,6 @@ impl FlattenedEncryptedAttributes {
3128
self.attrs.is_empty()
3229
}
3330

34-
// TODO: REmove this
3531
pub(crate) fn len(&self) -> usize {
3632
self.attrs.len()
3733
}

src/crypto/sealed.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ use std::{borrow::Cow, collections::HashMap};
1414

1515
use super::{attrs::NormalizedProtectedAttributes, SealError, Unsealed};
1616

17-
// FIXME: Remove this (only used for debugging)
18-
#[derive(Debug)]
1917
// FIXME: Move this to a separate file
2018
/// Wrapped to indicate that the value is encrypted
2119
pub struct SealedTableEntry(pub(super) TableEntry);
@@ -117,7 +115,6 @@ impl SealedTableEntry {
117115
.decrypt_all(cipher)
118116
.await?
119117
.into_iter()
120-
// FIXME: chunk_size is not the same as protected_attributes.len() when dealing with maps
121118
// TODO: Can we make decrypt_all return a Vec of FlattenedProtectedAttributes? (like the mirror of encrypt_all)
122119
.chunks(chunk_size)
123120
.into_iter()

src/crypto/sealer.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ pub type UnsealedIndex = (
2525
IndexType,
2626
);
2727

28-
// FIXME: Remove this (only used for debugging)
29-
#[derive(Debug)]
3028
/// Builder pattern for sealing a record of type, `T`.
3129
pub struct Sealer {
3230
pub(crate) pk: String,
@@ -250,8 +248,6 @@ struct Term {
250248
value: Vec<u8>,
251249
}
252250

253-
// FIXME: Remove this (only used for debugging)
254-
#[derive(Debug)]
255251
// FIXME: This struct is almost _identical_ to the one in encrypted_table/table_entry.rs
256252
pub struct Sealed {
257253
pk: String,

src/crypto/unsealed.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ use crate::{
99
use cipherstash_client::encryption::Plaintext;
1010
use std::collections::HashMap;
1111

12-
// FIXME: Remove this (only used for debugging)
13-
#[derive(Debug)]
1412
/// Wrapper to indicate that a value is NOT encrypted
1513
pub struct Unsealed {
1614
/// Protected plaintexts with their descriptors

src/encrypted_table/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ pub struct DynamoRecordPatch {
109109
pub delete_records: Vec<PrimaryKeyParts>,
110110
}
111111

112-
// FIXME: Remove this (only used for debugging)
113-
#[derive(Debug)]
114112
pub struct PreparedRecord {
115113
protected_indexes: Cow<'static, [(Cow<'static, str>, IndexType)]>,
116114
protected_attributes: Cow<'static, [Cow<'static, str>]>,
@@ -383,10 +381,7 @@ impl<D> EncryptedTable<D> {
383381

384382
let PrimaryKeyParts { pk, sk } = sealed.primary_key();
385383

386-
println!("PUT: PK: {}, SK: {}", pk, sk);
387-
388384
let (root, index_entries) = sealed.into_table_entries(index_predicate);
389-
println!("ROOT: {:?}", root);
390385

391386
seen_sk.insert(root.inner().sk.clone());
392387
put_records.push(root.try_into()?);

src/encrypted_table/table_attribute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub trait TryFromTableAttr: Sized {
1212
fn try_from_table_attr(value: TableAttribute) -> Result<Self, ReadConversionError>;
1313
}
1414

15-
#[derive(Debug, Clone, PartialEq)]
15+
#[derive(Clone, PartialEq)]
1616
pub enum TableAttribute {
1717
String(String),
1818
Number(String),

src/encrypted_table/table_attributes.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ use std::{
44
collections::{hash_map::IntoIter, HashMap},
55
};
66

7-
// FIXME: Remove this (only used for debugging)
8-
#[derive(Debug, Clone)]
7+
#[derive(Clone)]
98
/// Represents a collection of attributes for a table entry.
109
/// Attributes are stored as a map of `String` to `TableAttribute`.
1110
pub struct TableAttributes(HashMap<AttributeName, TableAttribute>);

src/encrypted_table/table_entry.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
use super::{table_attribute::TableAttribute, table_attributes::TableAttributes, AttributeName};
22

3-
// FIXME: Clean this up
4-
// FIXME: Can we remove the Clone and Debug?
5-
//#[skip_serializing_none]
6-
#[derive(Debug, Clone)]
73
pub struct TableEntry {
84
pub(crate) pk: String,
95
pub(crate) sk: String,

0 commit comments

Comments
 (0)