Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading from memory on windows #205

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions fitsio/tests/test_reading_from_memory.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// `fitsio` does not currently support opening files from memory, `cfitsio` _does_. This means we
// can use `Fitsfile::from_raw` to load a `FitsFile` from a file that was opened via
// `fits_open_memfile` in `cfitsio`.

use fitsio::{errors::check_status, sys, FileOpenMode, FitsFile};
use std::io::Read;

#[test]
fn reading_from_memory() {
// read the bytes into memory and return a pointer and length to the file

let (bytes, mut ptr_size) = {
let filename = "../testdata/full_example.fits";
let mut f = std::fs::File::open(filename).unwrap();
Expand Down