Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rust/arrow/examples/tensor_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
///! Tensor builder example
extern crate arrow;

use arrow::array::*; //{BufferBuilderTrait, Int32BufferBuilder, Float32BufferBuilder};
use arrow::array::*; //{Int32BufferBuilder, Float32BufferBuilder};
use arrow::buffer::Buffer;
use arrow::datatypes::ToByteSlice;
use arrow::error::Result;
Expand All @@ -30,7 +30,7 @@ fn main() -> Result<()> {
// to match the required size for each buffer
let mut builder = Int32BufferBuilder::new(16);
for i in 0..16 {
builder.append(i).unwrap();
builder.append(i);
}
let buf = builder.finish();

Expand All @@ -43,10 +43,10 @@ fn main() -> Result<()> {

// Creating a tensor using float type buffer builder
let mut builder = Float32BufferBuilder::new(4);
builder.append(1.0).unwrap();
builder.append(2.0).unwrap();
builder.append(3.0).unwrap();
builder.append(4.0).unwrap();
builder.append(1.0);
builder.append(2.0);
builder.append(3.0);
builder.append(4.0);
let buf = builder.finish();

// When building the tensor the buffer and shape are necessary
Expand Down
Loading