She and Justin depart the library together and Hermione outpaces him deliberately. She thinks Malfoy is probably waiting for her along the way and she knows he won't yank her into a broom closet four paces in front of Justin.