MCPcopy Create free account
hub / github.com/cretz/stackparam / read_classfile_version

Method read_classfile_version

src/bytecode/io/reader.rs:49–59  ·  view source on GitHub ↗
(reader: &mut BlockReader, _: &ClassFragment)

Source from the content-addressed store, hash-verified

47 }
48
49 fn read_classfile_version(reader: &mut BlockReader, _: &ClassFragment) -> Result<ClassFragment, Error> {
50 match (reader.read_u16(), reader.read_u16()) {
51 (Ok(minor_version), Ok(major_version)) => {
52 Ok(ClassFragment {
53 version: Some(ClassfileVersion::new(major_version, minor_version)),
54 ..Default::default()
55 })
56 },
57 _ => Err(Error::new(ErrorKind::UnexpectedEof, "Could not read classfile version number"))
58 }
59 }
60
61 fn read_constant_pool(reader: &mut BlockReader, _: &ClassFragment) -> Result<ClassFragment, Error> {
62 match reader.read_u16() {

Callers

nothing calls this directly

Calls 1

read_u16Method · 0.80

Tested by

no test coverage detected