Skip to content

Commit ce788ef

Browse files
committed
Renamed parser to reader + updated some comments
1 parent 8e981b2 commit ce788ef

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# class-rs
22

3-
Reads a .class file into an almost 1-to-1 matching struct or generate a .class file from said structure.\
3+
Reads a .class file into an almost 1-to-1 matching struct or generates a .class file from said structure.\
44
⚠️ `Constant::Utf8` are using Rust's String type and not the JVM's modified UTF-8. If you have a string that makes that crate panic, open an issue.
55

66
## Example

src/enums/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub enum Constant {
9494
class_index: u16,
9595
name_and_type_index: u16,
9696
},
97-
/// Used for the first entry, and the second entry of doubles and longs.
97+
/// Used for the first entry in the constant pool, and the second entry of doubles and longs.
9898
Invalid,
9999
InvokeDynamic {
100100
bootstrap_method_attr_index: u16,
@@ -125,6 +125,7 @@ pub enum Constant {
125125
String {
126126
string_index: u16,
127127
},
128+
/// ⚠️ It is using Rust's String type and not the JVM's modified UTF-8. If you have a string that makes that crate panic, open an issue.
128129
Utf8(String),
129130
}
130131

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! JVM class file reader
22
//!
3-
//! Reads a .class file into an almost 1-to-1 matching struct.
3+
//! Reads a .class file into an almost 1-to-1 matching struct or generates a .class file from said structure.
44
55
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
66
use std::error::Error;
@@ -20,8 +20,8 @@ pub use structs::{
2020
TypePath,
2121
};
2222

23-
mod parser;
24-
use crate::parser::{
23+
mod reader;
24+
use crate::reader::{
2525
extract_class_flags, read_attributes, read_constant_pool, read_fields, read_interfaces,
2626
read_methods,
2727
};
File renamed without changes.

0 commit comments

Comments
 (0)